Trait implicit3d::Object

source ·
pub trait Object<S: Real + 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>> { ... }
}
Expand description

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

Required Methods§

Get the Bounding Box of this Object.

Provided Methods§

Explicitly set the Bounding Box.

Allows to set parameters.

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.

Evaluate the normal of self at the given point.

Return a translated version of self.

Return a rotated version of self.

Return a scaled version of self.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Implementors§