[][src]Trait implicit3d::Object

pub trait Object<S: RealField + Float + From<f32>>: ObjectClone<S> + Debug + Sync + Send {
    fn bbox(&self) -> &BoundingBox<S>;

    fn set_bbox(&mut self, _: &BoundingBox<S>) { ... }
fn set_parameters(&mut self, _: &PrimitiveParameters<S>) { ... }
fn approx_value(&self, _: &Point3<S>, _: S) -> S { ... }
fn normal(&self, _: &Point3<S>) -> Vector3<S> { ... }
fn translate(&self, v: &Vector3<S>) -> Box<dyn Object<S>> { ... }
fn rotate(&self, r: &Vector3<S>) -> Box<dyn Object<S>> { ... }
fn scale(&self, s: &Vector3<S>) -> Box<dyn Object<S>> { ... } }

Object is the basic trait for any 3d implicit function.

Required methods

fn bbox(&self) -> &BoundingBox<S>

Get the Bounding Box of this Object.

Loading content...

Provided methods

fn set_bbox(&mut self, _: &BoundingBox<S>)

Explicitly set the Bounding Box.

fn set_parameters(&mut self, _: &PrimitiveParameters<S>)

Allows to set parameters.

fn approx_value(&self, _: &Point3<S>, _: S) -> S

Value is 0 on object surfaces, negative inside and positive outside of objects. If positive, value is guarateed to be the minimum distance to the object surface. return some approximation (which is always larger then the proper value). Only do a proper calculation, for values smaller then slack.

fn normal(&self, _: &Point3<S>) -> Vector3<S>

Evaluate the normal of self at the given point.

fn translate(&self, v: &Vector3<S>) -> Box<dyn Object<S>>

Return a translated version of self.

fn rotate(&self, r: &Vector3<S>) -> Box<dyn Object<S>>

Return a rotated version of self.

fn scale(&self, s: &Vector3<S>) -> Box<dyn Object<S>>

Return a scaled version of self.

Loading content...

Implementors

impl<S: Debug + RealField + From<f32> + Float> Object<S> for Cone<S>[src]

impl<S: Debug + RealField + From<f32> + Float> Object<S> for Cylinder<S>[src]

impl<S: Debug + RealField + Float + From<f32>> Object<S> for Sphere<S>[src]

impl<S: RealField + From<f32> + Float + FloatConst> Object<S> for Bender<S>[src]

impl<S: RealField + From<f32> + Float + FloatConst> Object<S> for Twister<S>[src]

impl<S: RealField + From<f32> + Float> Object<S> for Intersection<S>[src]

impl<S: RealField + From<f32> + Float> Object<S> for Union<S>[src]

impl<S: RealField + Float + From<f32>> Object<S> for AffineTransformer<S>[src]

impl<S: RealField + Float + From<f64> + From<f32>> Object<S> for Mesh<S>[src]

impl<S: Float + From<f32> + RealField> Object<S> for NormalPlane<S>[src]

Loading content...