R3Shapes Package
Description:
The R3Shapes package supports basics 3D geometry classes.
It contains classes representing 3D primitives (such as vectors,
points, lines, rays, spans, planes, and halfspaces). It also contains
classes for 3D transformations (such as 4x4 matrices, etc.) and higher
level 3D shapes (such as polygons, boxes, spheres, cones, pyramids,
prisms, etc). The higher level shape classes are derived from an
abstract R3Shape class which supports transformations, bounding box
queries, drawing, and other abstract geometric functions.
For all pairs of 3D primitives (and many 3D shapes), functions are
provided for computing the relationships between them. For instance,
there are functions to compute the distance between primitives
(R3Distance), check for intersections (R3Intersects), check whether
one primitive contains another (R3Contains), compute whether
primitives are perpendicular (R3Perpendicular), and check whether
primitives are parallel (R3Parallel).
List of Classes:
List of Functions:
- 3D Relationships:
- R3Distance - returns distance between two primitives.
- R3Intersects - returns whether two primitives intersect.
- R3Contains - returns whether one primitive contains another.
- R3Inside - returns whether one primitive is contained by another.
- R3Parallel - returns whether one primitive is parallel to another.
- R3Perpendicular - returns whether one primitive is perpendicular to another.
Example:
Click this to see a sample program.
-
Base Classes:
-
Public Base Classes:
- R3Transformation
-
Member Functions:
-
Constructor functions:
- R3Affine(void);
- R3Affine(const R4Matrix& matrix, RNBoolean mirror = 0);
- virtual ~R3Affine(void);
-
-
Property functions/operators:
- const R4Matrix& Matrix(void) const;
- const R4Matrix& InverseMatrix(void) const;
- const RNBoolean IsIdentity(void) const;
- const RNBoolean IsMirrored(void) const;
- const RNBoolean IsAffine(void) const;
- const RNBoolean IsIsotropic(void) const;
- const RNBoolean HasTranslation(void) const;
- const RNBoolean HasScale(void) const;
- const RNBoolean HasRotation(void) const;
- const RNBoolean HasMirror(void) const;
- const R3Affine Inverse(void) const;
-
-
Application functions/operators:
- void Apply(R3Vector& vector) const;
- void Apply(R3Point& point) const;
- void Apply(R3Transformation& transformation) const;
- void Apply(R3Affine& affine) const;
- void ApplyInverse(R3Vector& vector) const;
- void ApplyInverse(R3Point& point) const;
- void ApplyInverse(R3Transformation& transformation) const;
- void ApplyInverse(R3Affine& affine) const;
- void ApplyInverseTranspose(R3Vector& vector) const;
- void ApplyTranspose(R3Vector& vector) const;
-
-
Manipulation functions/operators:
- void Invert(void);
- void Mirror(void);
- void XMirror(void);
- void YMirror(void);
- void ZMirror(void);
- void Mirror(RNAxis axis);
- void Mirror(const R3Plane& plane);
- void XTranslate(RNScalar offset);
- void YTranslate(RNScalar offset);
- void ZTranslate(RNScalar offset);
- void Translate(RNScalar offset);
- void Translate(RNAxis axis, RNScalar offset);
- void Translate(const R3Vector& offset);
- void XScale(RNScalar scale);
- void YScale(RNScalar scale);
- void ZScale(RNScalar scale);
- void Scale(RNScalar scale);
- void Scale(RNAxis axis, RNScalar scale);
- void Scale(const R3Vector& scale);
- void XRotate(RNAngle radians);
- void YRotate(RNAngle radians);
- void ZRotate(RNAngle radians);
- void Rotate(const R3Vector& radians);
- void Rotate(RNAxis axis, RNAngle radians);
- void Rotate(const R3Vector& vector, RNAngle radians);
- void Rotate(const R3Vector& from, const R3Vector& to);
- void Transform(const R3Transformation& transformation);
- void Transform(const R3Affine& affine);
- void InverseTransform(const R3Transformation& transformation);
- void InverseTransform(const R3Affine& affine);
- void Reset(const R3Transformation& transformation);
- void Reset(const R4Matrix& matrix, RNBoolean mirror = 0);
-
-
Draw functions/operators:
- void Load(void) const;
- void Draw(void) const;
- void Push(void) const;
- void Pop(void) const;
-
-
Do not use these ???:
- const RNScalar ScaleFactor(void) const;
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Base Classes:
-
Public Base Classes:
- R3Solid
-
Member Functions:
-
Constructor functions:
- R3Box(void);
- R3Box(const R3Box& box);
- R3Box(const R3Point& min, const R3Point& max);
- R3Box(RNCoord xmin, RNCoord ymin, RNCoord zmin,
- RNCoord xmax, RNCoord ymax, RNCoord zmax);
-
-
Box property functions/operators:
- const RNCoord XMin(void) const;
- const RNCoord YMin(void) const;
- const RNCoord ZMin(void) const;
- const RNCoord XMax(void) const;
- const RNCoord YMax(void) const;
- const RNCoord ZMax(void) const;
- const RNCoord Coord(RNDirection dir, RNDimension dim) const;
- const R3Point& Min(void) const;
- const R3Point& Max(void) const;
- const R3Point Corner(RNOctant octant) const;
- const R3Point Corner(RNDirection xdir, RNDirection ydir, RNDirection zdir) const;
- const R3Point Centroid(void) const;
- const R3Point ClosestPoint(const R3Point& point) const;
- const R3Plane Plane(RNSide side) const;
- const R3Plane Plane(RNDirection dir, RNDimension dim) const;
- const R3Box Side(RNSide side) const;
- const R3Box Side(RNDirection dir, RNDimension dim) const;
- const R3Box Octant(RNOctant octant) const;
- const R3Box Octant(RNDirection xdir, RNDirection ydir, RNDirection zdir) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
- const int NDimensions(void) const;
- const int NDimensionsAlongSide(RNDirection dir, RNDimension dim) const;
- const RNBoolean IsSideNull(RNDirection dir, RNDimension dim) const;
- const RNBoolean IsSideLinear(RNDirection dir, RNDimension dim) const;
- const int NDimensionsAlongAxis(const RNAxis axis) const;
- const RNBoolean IsAxisNull(const RNAxis axis) const;
- const RNLength XLength(void) const;
- const RNLength YLength(void) const;
- const RNLength ZLength(void) const;
- const RNLength AxisLength(const RNAxis axis) const;
- const RNLength DiagonalLength(void) const;
- const RNLength XRadius(void) const;
- const RNLength YRadius(void) const;
- const RNLength ZRadius(void) const;
- const RNLength AxisRadius(const RNAxis axis) const;
- const RNLength DiagonalRadius(void) const;
- const RNCoord XCenter(void) const;
- const RNCoord YCenter(void) const;
- const RNCoord ZCenter(void) const;
- const RNCoord AxisCenter(const RNAxis axis) const;
- const RNAxis ShortestAxis(void) const;
- const RNAxis LongestAxis(void) const;
- const RNLength ShortestAxisLength(void) const;
- const RNLength LongestAxisLength(void) const;
-
-
Shape property functions:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsPlanar(void) const;
- virtual const RNBoolean IsConvex(void) const;
- virtual const RNInterval NFacets(void) const;
- virtual const RNArea Area(void) const;
- virtual const RNVolume Volume(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Empty(void);
- virtual void Inflate(RNScalar fraction);
- virtual void Translate(const R3Vector& vector);
- virtual void Union(const R3Point& point);
- virtual void Union(const R3Box& box);
- virtual void Union(const R3Sphere& sphere);
- virtual void Intersect(const R3Box& box);
- virtual void Transform(const R3Transformation& transformation);
- virtual void Reset(const R3Point& min, const R3Point& max);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Relationship functions/operators:
- RNBoolean operator==(const R3Box& box) const;
- RNBoolean operator!=(const R3Box& box) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Box);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Box);
-
-
Undocumented functions/operators:
- const R3Point& operator[](RNDirection dir) const;
- R3Point& operator[](RNDirection dir);
-
-
Base Classes:
-
Public Base Classes:
- R3Surface
-
Member Functions:
-
Constructor functions:
- R3Circle(void);
- R3Circle(const R3Circle& circle);
- R3Circle(const R3Point& center, RNLength radius, const R3Vector& normal);
- R3Circle(const R3Point& p1, const R3Point& p2, const R3Point& p3);
-
-
Circle property functions/operators:
- const R3Point& Center(void) const;
- const RNLength Radius(void) const;
- const R3Plane& Plane(void) const;
- const R3Vector& Normal(void) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
-
-
Shape property functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsPlanar(void) const;
- virtual const RNBoolean IsConvex(void) const;
- virtual const RNInterval NFacets(void) const;
- virtual const RNLength Length(void) const;
- virtual const RNArea Area(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Relationship functions/operators:
- RNBoolean operator==(const R3Circle& circle) const;
- RNBoolean operator!=(const R3Circle& circle) const;
-
-
Manipulation functions/operators:
- virtual void Flip(void);
- virtual void Reposition(const R3Point& center);
- virtual void Translate(const R3Vector& offset);
- virtual void Align(const R3Vector& normal);
- virtual void Resize(RNScalar radius);
- virtual void Transform(const R3Transformation& transformation);
- virtual void Reset(const R3Point& center, RNScalar radius, const R3Vector& normal);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Circle);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Circle);
-
-
Base Classes:
-
Public Base Classes:
- R3Solid
-
Member Functions:
-
Constructor functions:
- R3Cone(void);
- R3Cone(const R3Cone& cone);
- R3Cone(const R3Span& axis, RNLength radius);
- R3Cone(const R3Point& p1, const R3Point& p2, RNLength radius);
-
-
Cone propetry functions/operators:
- const R3Point& Apex(void) const;
- const R3Span& Axis(void) const;
- const R3Circle& Base(void) const;
- const RNLength Radius(void) const;
- const RNLength Height(void) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
-
-
Shape propetry functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const ;
- virtual const RNBoolean IsPlanar(void) const ;
- virtual const RNBoolean IsConvex(void) const ;
- virtual const RNInterval NFacets(void) const;
- virtual const RNArea Area(void) const;
- virtual const RNVolume Volume(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Empty(void);
- virtual void Translate(const R3Vector& vector);
- virtual void Reposition(const R3Span& span);
- virtual void Resize(RNLength radius);
- virtual void Transform(const R3Transformation& transformation);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Relationship functions/operators:
- RNBoolean operator==(const R3Cone& cone) const;
- RNBoolean operator!=(const R3Cone& cone) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Cone);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Cone);
-
-
Base Classes:
-
Public Base Classes:
- R3Base
-
Member Functions:
-
Constructor functions:
- R3CoordSystem(void);
- R3CoordSystem(const R3CoordSystem& cs);
- R3CoordSystem(const R3Point& origin, const R3Triad& axes);
-
-
Property functions/operators:
- const R3Point& Origin(void) const;
- const R3Triad& Axes(void) const;
- const R4Matrix Matrix(void) const;
- const R4Matrix InverseMatrix(void) const;
- const RNBoolean operator==(const R3CoordSystem& cs) const;
- const RNBoolean operator!=(const R3CoordSystem& cs) const;
-
-
Manipulation functions/operators:
- void Translate(const R3Vector& offset);
- void Rotate(RNAxis axis, RNAngle radians);
- void Rotate(const R3Vector& axis, RNAngle radians);
- void Rotate(const R3Vector& from, const R3Vector& to);
- void Mirror(const R3Plane& plane);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void SetOrigin(const R3Point& origin);
- void SetAxes(const R3Triad& axes);
-
-
Draw functions/operators:
- void Draw(void) const;
- void Outline(void) const;
-
-
Base Classes:
-
Public Base Classes:
- R3Shape
-
Member Functions:
-
Constructors/destructors ???:
- R3Curve(void);
- ~R3Curve(void);
-
-
Shape property functions/operators:
- const RNBoolean IsCurve(void) const;
-
-
Curve property functions/operators:
-
virtual const R3Point StartPoint(void) const = 0;:
-
virtual const R3Point EndPoint(void) const = 0;:
-
Base Classes:
-
Public Base Classes:
- R3Solid
-
Member Functions:
-
Constructor functions:
- R3Cylinder(void);
- R3Cylinder(const R3Cylinder& cylinder);
- R3Cylinder(const R3Span& axis, RNLength radius);
- R3Cylinder(const R3Point& p1, const R3Point& p2, RNLength radius);
-
-
Cylinder propetry functions/operators:
- const R3Span& Axis(void) const;
- const R3Circle& Base(void) const;
- const R3Circle& Top(void) const;
- const RNLength Radius(void) const;
- const RNLength Height(void) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
-
-
Shape propetry functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const ;
- virtual const RNBoolean IsPlanar(void) const ;
- virtual const RNBoolean IsConvex(void) const ;
- virtual const RNInterval NFacets(void) const;
- virtual const RNArea Area(void) const;
- virtual const RNVolume Volume(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Empty(void);
- virtual void Translate(const R3Vector& vector);
- virtual void Reposition(const R3Span& span);
- virtual void Resize(RNLength radius);
- virtual void Transform(const R3Transformation& transformation);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Relationship functions/operators:
- RNBoolean operator==(const R3Cylinder& cylinder) const;
- RNBoolean operator!=(const R3Cylinder& cylinder) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Cylinder);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Cylinder);
-
-
Base Classes:
-
Public Base Classes:
- R3Surface
-
Member Functions:
-
Constructor functions:
- R3Ellipse(void);
- R3Ellipse(const R3Ellipse& ellipse);
- R3Ellipse(const R3CoordSystem& cs, const R2Vector& radii);
-
-
Ellipse property functions/operators:
- const R3Point& Center(void) const;
- const R2Vector& Radii(void) const;
- const R3Plane Plane(void) const;
- const R3Vector& Normal(void) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
-
-
Shape property functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsPlanar(void) const;
- virtual const RNBoolean IsConvex(void) const;
- virtual const RNInterval NFacets(void) const;
- virtual const RNArea Area(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Flip(void);
- virtual void Empty(void);
- virtual void Translate(const R3Vector& vector);
- virtual void Reposition(const R3Point& center);
- virtual void Resize(const R2Vector& radii);
- virtual void Transform(const R3Transformation& transformation);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Relationship functions/operators:
- RNBoolean operator==(const R3Ellipse& ellipse) const;
- RNBoolean operator!=(const R3Ellipse& ellipse) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Ellipse);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Ellipse);
-
-
Upkeep functions:
- void UpdateBBox(void);
-
-
Base Classes:
-
Public Base Classes:
- R3Solid
-
Member Functions:
-
Constructor functions:
- R3Ellipsoid(void);
- R3Ellipsoid(const R3Ellipsoid& ellipsoid);
- R3Ellipsoid(const R3CoordSystem& cs, const R3Vector& radii);
-
-
Ellipsoid property functions/operators:
- const R3Point& Center(void) const;
- const R3CoordSystem& CoordSystem(void) const;
- const R3Vector& Radii(void) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
-
-
Shape property functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsPlanar(void) const;
- virtual const RNBoolean IsConvex(void) const;
- virtual const RNInterval NFacets(void) const;
- virtual const RNArea Area(void) const;
- virtual const RNVolume Volume(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Empty(void);
- virtual void Translate(const R3Vector& vector);
- virtual void Reposition(const R3Point& center);
- virtual void Resize(const R3Vector& radii);
- virtual void Transform(const R3Transformation& transformation);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Relationship functions/operators:
- RNBoolean operator==(const R3Ellipsoid& ellipsoid) const;
- RNBoolean operator!=(const R3Ellipsoid& ellipsoid) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Ellipsoid);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Ellipsoid);
-
-
Upkeep functions:
- void UpdateBBox(void);
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructors:
- R3Grid(int xresolution = 0, int yresolution = 0, int zresolution = 0);
- R3Grid(int xresolution, int yresolution, int zresolution, const R3Box& bbox);
- R3Grid(const R3Grid& grid);
- ~R3Grid(void);
-
-
Grid property functions:
- int NEntries(void) const;
- int XResolution(void) const;
- int YResolution(void) const;
- int ZResolution(void) const;
- int Resolution(RNDimension dim) const;
- RNScalar Sum(void) const;
- RNScalar Mean(void) const;
- RNScalar Variance(void) const;
- RNScalar StandardDeviation(void) const;
- RNScalar Maximum(void) const;
- RNScalar Minimum(void) const;
- RNInterval Range(void) const;
- RNScalar L1Norm(void) const;
- RNScalar L2Norm(void) const;
- RNScalar L2NormSquared(void) const;
- RNScalar Volume(void) const;
- int Cardinality(void) const;
- R3Box GridBox(void) const;
- R3Box WorldBox(void) const;
- R3Point GridCentroid(void) const;
- R3Point WorldCentroid(void) const;
- R3Triad GridPrincipleAxes(const R3Point *grid_centroid = NULL, RNScalar *variances = NULL) const;
- R3Triad WorldPrincipleAxes(const R3Point *world_centroid = NULL, RNScalar *variances = NULL) const;
-
-
Transformation property functions:
- const R3Affine& WorldToGridTransformation(void) const;
- const R3Affine& GridToWorldTransformation(void) const;
- RNScalar WorldToGridScaleFactor(void) const;
- RNScalar GridToWorldScaleFactor(void) const;
- RNScalar WorldSpacing(RNDimension dim) const;
-
-
Grid value access functions:
- RNScalar GridValue(int index) const;
- RNScalar GridValue(int i, int j, int k) const;
- RNScalar GridValue(RNCoord x, RNCoord y, RNCoord z) const;
- RNScalar GridValue(const R3Point& grid_point) const;
- RNScalar WorldValue(RNCoord x, RNCoord y, RNCoord z) const;
- RNScalar WorldValue(const R3Point& world_point) const;
- RNScalar& operator()(int i, int j,int k);
-
-
Grid manipulation functions:
- void Abs(void);
- void Sqrt(void);
- void Square(void);
- void Negate(void);
- void Invert(void);
- void Normalize(void);
- void DetectEdges(void);
- void Dilate(RNScalar grid_distance);
- void Erode(RNScalar grid_distance);
- void Blur(RNScalar grid_sigma = 2);
- void Clear(RNScalar value = 0);
- void Add(RNScalar value);
- void Copy(const R3Grid& grid);
- void Add(const R3Grid& grid);
- void Add(const R3Grid& grid, const R3Point& grid_position, const R3Point& filter_origin, RNScalar amplitude = 1);
- void Subtract(RNScalar value);
- void Subtract(const R3Grid& grid);
- void Multiply(RNScalar value);
- void Multiply(const R3Grid& grid);
- void Divide(RNScalar value);
- void Divide(const R3Grid& grid);
- void Pow(RNScalar exponent);
- void Mask(const R3Grid& grid);
- void Threshold(RNScalar threshold, RNScalar low, RNScalar high);
- void SquaredDistanceTransform(void);
- void Voronoi(R3Grid *squared_distance_grid = NULL);
- void Gauss(RNLength sigma = sqrt(8.0), RNBoolean square = TRUE);
- void Resample(int xres, int yres, int zres);
- void SetGridValue(int index, RNScalar value);
- void SetGridValue(int i, int j, int k, RNScalar value);
- void AddGridValue(int i, int j, int k, RNScalar value);
-
-
Arithmetic operators:
- R3Grid& operator=(const R3Grid& grid);
- R3Grid& operator+=(RNScalar scale);
- R3Grid& operator+=(const R3Grid& grid);
- R3Grid& operator-=(RNScalar scale);
- R3Grid& operator-=(const R3Grid& grid);
- R3Grid& operator*=(RNScalar scale);
- R3Grid& operator*=(const R3Grid& grid);
- R3Grid& operator/=(RNScalar scale);
- R3Grid& operator/=(const R3Grid& grid);
-
-
Rasterization functions:
- void RasterizeGridPoint(RNCoord x, RNCoord y, RNCoord z, RNScalar value);
- void RasterizeWorldPoint(RNCoord x, RNCoord y, RNCoord z, RNScalar value);
- void RasterizeGridPoint(const R3Point& point, RNScalar value);
- void RasterizeWorldPoint(const R3Point& point, RNScalar value);
- void RasterizeGridSpan(const int p1[3], const int p2[3], RNScalar value);
- void RasterizeGridSpan(const R3Point& p1, const R3Point& p2, RNScalar value);
- void RasterizeWorldSpan(const R3Point& p1, const R3Point& p2, RNScalar value);
- void RasterizeGridTriangle(const int p1[3], const int p2[3], const int p3[3], RNScalar value);
- void RasterizeGridTriangle(const R3Point& p1, const R3Point& p2, const R3Point& p3, RNScalar value);
- void RasterizeWorldTriangle(const R3Point& p1, const R3Point& p2, const R3Point& p3, RNScalar value);
- void RasterizeGridSphere(const R3Point& center, RNLength radius, RNScalar value, RNBoolean solid = TRUE);
- void RasterizeWorldSphere(const R3Point& center, RNLength radius, RNScalar value, RNBoolean solid = TRUE);
-
-
Relationship functions:
- RNScalar Dot(const R3Grid& grid) const;
- RNScalar L1Distance(const R3Grid& grid) const;
- RNScalar L2Distance(const R3Grid& grid) const;
- RNScalar L2DistanceSquared(const R3Grid& grid) const;
-
-
Transformation manipulation functions:
- void SetWorldToGridTransformation(const R3Affine& affine);
- void SetWorldToGridTransformation(const R3Box& world_box);
- void SetWorldToGridTransformation(const R3Point& world_origin, const R3Vector& world_axis1, const R3Vector& world_axis2, RNLength world_radius);
-
-
Transformation utility functions:
- R3Point WorldPosition(const R3Point& grid_point) const;
- R3Point GridPosition(const R3Point& world_point) const;
- R3Point WorldPosition(RNCoord x, RNCoord y, RNCoord z) const;
- R3Point GridPosition(RNCoord x, RNCoord y, RNCoord z) const;
-
-
I/O functions:
- int ReadFile(const char *filename);
- int WriteFile(const char *filename) const;
- int ReadGridFile(const char *filename);
- int ReadDelphiFile(const char *filename);
- int ReadInsightFile(const char *filename);
- int ReadDXFile(const char *filename);
- int WriteGridFile(const char *filename) const;
- int ReadGrid(FILE *fp = NULL);
- int WriteGrid(FILE *fp = NULL) const;
- int Print(FILE *fp = NULL) const;
-
-
Visualization functions:
- void DrawIsoSurface(RNScalar isolevel) const;
- void DrawSlice(int dim, int coord) const;
-
-
Utility functions:
- int ConnectedComponents(RNScalar isolevel = 0, int max_components = 0, int *seeds = NULL, int *sizes = NULL, int *grid_components = NULL);
- int GenerateIsoSurface(RNScalar isolevel, R3Point *points, int max_points) const;
-
-
Debugging functions:
- const RNScalar *GridValues(void) const;
- void IndicesToIndex(int i, int j, int k, int& index);
- void IndexToIndices(int index, int& i, int& j, int& k);
-
-
Gaussian filtering:
- RNScalar GridValue(RNCoord x, RNCoord y, RNCoord z, RNLength sigma) const;
- RNScalar WorldValue(RNCoord x, RNCoord y, RNCoord z, RNLength sigma) const;
- void RasterizeGridPoint(RNCoord x, RNCoord y, RNCoord z, RNScalar value, RNLength sigma);
- void RasterizeWorldPoint(RNCoord x, RNCoord y, RNCoord z, RNScalar value, RNLength sigma);
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor functions:
- R3Halfspace(void);
- R3Halfspace(const R3Halfspace& halfspace);
- R3Halfspace(RNScalar a, RNScalar b, RNScalar c, RNScalar d);
- R3Halfspace(const RNScalar array[4]);
- R3Halfspace(const R3Vector& normal, RNScalar d);
- R3Halfspace(const R3Point& point, const R3Vector& normal);
- R3Halfspace(const R3Point& point, const R3Line& line);
- R3Halfspace(const R3Point& point, const R3Vector& vector1, const R3Vector& vector2);
- R3Halfspace(const R3Point& point1, const R3Point& point2, const R3Point& point3);
- R3Halfspace(const R3Plane& plane, int dummy /* avoid implicit conversion */);
-
-
Property functions/operators:
- const R3Plane& Plane(void) const;
- const R3Vector& Normal(void) const;
- const RNBoolean IsZero(void) const;
- const RNBoolean operator==(const R3Halfspace& halfspace) const;
- const RNBoolean operator!=(const R3Halfspace& halfspace) const;
-
-
Manipulation functions/operators:
- void Flip(void);
- void Mirror(const R3Plane& plane);
- void Translate(const R3Vector& vector);
- void Reposition(const R3Point& point);
- void Align(const R3Vector& vector);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(const R3Plane& plane);
-
-
Draw functions/operators:
- void Draw(void) const;
-
-
Arithmetic functions/operators:
- R3Halfspace operator-(void) const;
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor/destructors:
- R3Kdtree(const R3Box& bbox, int position_offset = 0);
- R3Kdtree(const RNArray& points, int position_offset = 0);
- R3Kdtree(const RNArray& points, R3Point (*position_callback)(PtrType, void *), void *data);
- ~R3Kdtree(void);
-
-
Property functions:
- const R3Box& BBox(void) const;
- int NNodes(void) const;
-
-
Search for closest to a point:
- PtrType FindClosest(PtrType point, RNLength min_distance = 0, RNLength max_distance = RN_INFINITY, RNLength *closest_distance = NULL) const;
- PtrType FindClosest(const R3Point& position, RNLength min_distance = 0, RNLength max_distance = RN_INFINITY, RNLength *closest_distance = NULL) const;
-
-
Search for all within some distance to a point:
- int FindAll(PtrType point, RNLength min_distance, RNLength max_distance, RNArray& points) const;
- int FindAll(const R3Point& position, RNLength min_distance, RNLength max_distance, RNArray& points) const;
-
-
Internal search functions:
- void FindClosest(R3KdtreeNode *node, const R3Box& node_box, const R3Point& position,
- RNLength min_distance_squared, RNLength max_distance_squared,
- PtrType& closest_point, RNLength& closest_distance_squared) const;
- void FindAll(R3KdtreeNode *node, const R3Box& node_box, const R3Point& position,
- RNLength min_distance_squared, RNLength max_distance_squared, RNArray& points) const;
-
-
Internal manipulation functions:
- void InsertPoints(R3KdtreeNode *node, const R3Box& node_box, PtrType *points, int npoints);
- int PartitionPoints(PtrType *points, int npoints, RNDimension dim, int imin, int imax);
-
-
Internal visualization functions:
- void Outline(R3KdtreeNode *node, const R3Box& bbox) const;
- void Outline(void) const;
-
-
Internal debugging functions:
- void PrintDebugInfo(void) const;
- int PrintBalance(R3KdtreeNode *node, int depth) const;
-
-
Internal point extraction function:
- const R3Point Position(PtrType point) const {
- if (position_offset >= 0) return *((R3Point *) ((unsigned char *) point + position_offset));
- else if (position_callback) return (*position_callback)(point, position_callback_data);
- else { fprintf(stderr, "Invalid position callback\n"); abort(); return R3null_point; }
- } ;
-
-
Internal data:
- R3Box bbox;
- int position_offset;
- R3Point (*position_callback)(PtrType, void *);
- void *position_callback_data;
- R3KdtreeNode *root;
- int nnodes;
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor functions:
- R3Line(void);
- R3Line(const R3Line& line);
- R3Line(const R3Point& point, const R3Vector& vector, RNBoolean normalized = FALSE);
- R3Line(const R3Point& point1, const R3Point& point2);
- R3Line(RNCoord x1, RNCoord y1, RNCoord z1, RNCoord x2, RNCoord y2, RNCoord z2);
-
-
Property functions/operators:
- const R3Point& Point(void) const;
- const R3Vector& Vector(void) const;
- const RNBoolean IsZero(void) const;
- const RNBoolean operator==(const R3Line& line) const;
- const RNBoolean operator!=(const R3Line& line) const;
-
-
Manipulation functions/operators:
- void Flip(void);
- void Mirror(const R3Plane& plane);
- void Translate(const R3Vector& vector);
- void Reposition(const R3Point& point);
- void Align(const R3Vector& vector, RNBoolean normalized = FALSE);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(const R3Point& point, const R3Vector& vector, RNBoolean normalized = FALSE);
-
-
Draw functions/operators:
- void Draw(void) const;
-
-
Arithmetic functions/operators:
- R3Line operator-(void) const;
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
CONSTRUCTOR FUNCTIONS:
- R3Mesh(void);
-
Create an empty mesh:
- virtual ~R3Mesh(void);
-
Deallocate all data associated with mesh:
-
-
VERTEX/EDGE/FACE ENUMERATION FUNCTIONS:
- int NVertices(void) const;
-
Return number of vertices in mesh:
- R3MeshVertex *Vertex(int k) const;
-
Return kth vertex of mesh:
- int NEdges(void) const;
-
Return number of edges in mesh:
- R3MeshEdge *Edge(int k) const;
-
Return kth edge of mesh:
- int NFaces(void) const;
-
Return number of faces in mesh:
- R3MeshFace *Face(int k) const;
-
Return kth face of mesh:
-
-
MESH PROPERTIES:
- const char *Name(void) const;
-
Return name of mesh:
- const R3Box& BBox(void) const;
-
Return bounding box of all vertices in mesh:
- R3Point Centroid(void) const;
-
Return centroid of mesh:
- RNLength AverageRadius(const R3Point *centroid = NULL) const;
-
Return average distance from point on surface to centroid:
- R3Triad PrincipleAxes(const R3Point *centroid = NULL, RNScalar *variances = NULL) const;
-
Return principle axes of mesh:
- R3Affine PCANormalizationTransformation(RNBoolean translate, RNBoolean rotate, RNBoolean scale) const;
-
Return transformation that aligns centroid, principal axes, and scale with R3xyz_triad:
-
-
VERTEX PROPERTIES:
- const R3Point& VertexPosition(const R3MeshVertex *vertex) const;
-
Returns the position of the vertex:
- const R3Vector& VertexNormal(const R3MeshVertex *vertex) const;
-
Returns the normal of the vertex:
- int VertexValence(const R3MeshVertex *vertex) const;
-
Returns the number of edges attached to vertex:
- int VertexID(const R3MeshVertex *vertex) const;
-
Returns the ID stored with a vertex:
- RNFlags VertexFlags(const R3MeshVertex *vertex) const;
-
Returns the flags stored with a vertex:
- RNScalar VertexValue(const R3MeshVertex *vertex) const;
-
Returns the value stored with a vertex:
- RNMark VertexMark(const R3MeshVertex *vertex) const;
-
Returns the mark stored with a vertex:
- void *VertexData(const R3MeshVertex *vertex) const;
-
Returns the user data stored with a vertex:
-
-
EDGE PROPERTIES:
- RNLength EdgeLength(const R3MeshEdge *edge) const;
-
Returns the length of the edge:
- R3Point EdgeMidpoint(const R3MeshEdge *edge) const;
-
Returns the midpoint of the edge:
- RNAngle EdgeInteriorAngle(const R3MeshEdge *edge) const;
-
Returns interior angle between adjacent faces in range 0 to 2*PI (returns 0 if boundary edge):
- RNScalar EdgeAspect(const R3MeshEdge *edge) const;
-
Returns ratio of "distance between vertices across faces" over edge length:
- R3Vector EdgeVector(const R3MeshEdge *edge) const;
-
Returns a vector along the edge (v2 - v1):
- R3Vector EdgeDirection(const R3MeshEdge *edge) const;
-
Returns a normalized vector along edge (v2 - v1)/||v2 - v1||:
- R3Span EdgeSpan(const R3MeshEdge *edge) const;
-
Returns the span covering the edge:
- R3Line EdgeLine(const R3MeshEdge *edge) const;
-
Returns the line supporting the edge:
- R3Box EdgeBBox(const R3MeshEdge *edge) const;
-
Returns the bounding box of the edge:
- int EdgeID(const R3MeshEdge *edge) const;
-
Returns the ID stored with a edge:
- RNFlags EdgeFlags(const R3MeshEdge *edge) const;
-
Returns the flags stored with the edge:
- RNScalar EdgeValue(const R3MeshEdge *edge) const;
-
Returns the value stored with a edge:
- RNMark EdgeMark(const R3MeshEdge *edge) const;
-
Returns the mark stored with the edge:
- void *EdgeData(const R3MeshEdge *edge) const;
-
Returns the user data stored with the edge:
-
-
FACE PROPERTIES:
- const R3Vector& FaceNormal(const R3MeshFace *face) const;
-
Returns the normal of the face:
- const R3Plane& FacePlane(const R3MeshFace *face) const;
-
Returns the plane equation of the face:
- R3Point FaceCentroid(const R3MeshFace *face) const;
-
Returns the centroid of the face:
- R3Point FacePoint(const R3MeshFace *face, RNMagnitude barycentrics[3]) const;
-
Returns the point on the face with the given barycentric coordinates:
- R3Point FaceBarycentric(const R3MeshFace *face, const R3Point& point) const;
-
Returns the barycentric coordinates of point on face:
- const R3Box& FaceBBox(const R3MeshFace *face) const;
-
Returns the bounding box of the face:
- RNArea FaceArea(const R3MeshFace *face) const;
-
Returns the area of the face:
- int FaceMaterial(const R3MeshFace *face) const;
-
Returns the material ID associated with a face:
- int FaceSegment(const R3MeshFace *face) const;
-
Returns the segment ID associated with a face:
- int FaceID(const R3MeshFace *face) const;
-
Returns the ID stored with a face:
- RNFlags FaceFlags(const R3MeshFace *face) const;
-
Returns the flags stored with a face:
- RNScalar FaceValue(const R3MeshFace *face) const;
-
Returns the value stored with a face:
- RNMark FaceMark(const R3MeshFace *face) const;
-
Returns the mark stored with a face:
- void *FaceData(const R3MeshFace *face) const;
-
Returns the user data stored with a face:
-
-
MANIPULATION FUNCTIONS:
- void Empty(void);
-
Delete all vertices, edges, faces:
- void Transform(const R3Transformation& transformation);
-
Transform mesh:
- void SetName(const char *name);
-
Set mesh name:
-
-
VERTEX MANIPULATION FUNCTIONS:
- void SetVertexPosition(R3MeshVertex *vertex, const R3Point& position);
-
Set new position for vertex:
- void SetVertexNormal(R3MeshVertex *vertex, const R3Vector& normal);
-
Set new normal for vertex:
- void SetVertexValue(R3MeshVertex *vertex, RNScalar value);
-
Set the value stored with a vertex:
- void SetVertexMark(R3MeshVertex *vertex, RNMark mark);
-
Set the mark stored with a vertex:
- void SetVertexData(R3MeshVertex *vertex, void *data);
-
Set the data stored with a vertex:
- void SetVertexFlags(R3MeshVertex *vertex, RNFlags flags);
-
Set the flags stored with a vertex:
-
-
EDGE MANIPULATION FUNCTIONS:
- void SetEdgeMark(R3MeshEdge *edge, RNMark mark);
-
Set the mark stored with a edge:
- void SetEdgeValue(R3MeshEdge *edge, RNScalar value);
-
Set the value stored with a edge:
- void SetEdgeData(R3MeshEdge *edge, void *data);
-
Set the data stored with a edge:
- void SetEdgeFlags(R3MeshEdge *edge, RNFlags flags);
-
Set the flags stored with a edge:
-
-
FACE MANIPULATION FUNCTIONS:
- void SetFacePlane(R3MeshFace *face, const R3Plane& plane);
-
Set the plane equation for a face:
- void SetFaceMaterial(R3MeshFace *face, int material);
-
Set the material associated with a face:
- void SetFaceSegment(R3MeshFace *face, int segment);
-
Set the segment associated with a face:
- void SetFaceMark(R3MeshFace *face, RNMark mark);
-
Set the mark stored with a face:
- void SetFaceValue(R3MeshFace *face, RNScalar value);
-
Set the value stored with a face:
- void SetFaceData(R3MeshFace *face, void *data);
-
Set the data stored with a face:
- void SetFaceFlags(R3MeshFace *face, RNFlags flags);
-
Set the flags stored with a face:
-
-
VERTEX TRAVERSAL FUNCTIONS:
- R3MeshEdge *EdgeOnVertex(const R3MeshVertex *vertex) const;
-
Returns any edge connected to vertex:
- R3MeshEdge *EdgeOnVertex(const R3MeshVertex *vertex, int k) const;
-
Returns kth edge connected to vertex (edges are not sorted!):
- R3MeshEdge *EdgeBetweenVertices(const R3MeshVertex *vertex1, const R3MeshVertex *vertex2) const;
-
Returns edge spanning between two vertices (or NULL if none):
- R3MeshEdge *EdgeOnVertex(const R3MeshVertex *vertex, const R3MeshEdge *edge, RNDirection dir = RN_CCW) const;
-
Returns edge on vertex in dir with respect to edge:
- R3MeshEdge *EdgeOnVertex(const R3MeshVertex *vertex, const R3MeshFace *face, RNDirection dir = RN_CCW) const;
-
Returns edge on vertex in dir with respect to face:
- R3MeshEdge *EdgeAcrossVertex(const R3MeshVertex *vertex, const R3MeshEdge *edge, const R3MeshFace *face) const;
-
Returns edge on the other side of a vertex from an edge on the same face:
- R3MeshFace *FaceOnVertex(const R3MeshVertex *vertex) const;
-
Returns any face connected to vertex:
- R3MeshFace *FaceBetweenVertices(const R3MeshVertex *vertex1, const R3MeshVertex *vertex2, RNDirection dir = RN_CCW) const;
-
Returns face between two vertices (in dir with respect to v1) or NULL if there is none:
- R3MeshFace *FaceOnVertex(const R3MeshVertex *vertex, const R3MeshEdge *edge, RNDirection dir = RN_CCW) const;
-
Returns face on vertex in dir with respect to edge:
- R3MeshFace *FaceOnVertex(const R3MeshVertex *vertex, const R3MeshFace *face, RNDirection dir = RN_CCW) const;
-
Returns face on vertex in dir with respect to face:
-
-
EDGE TRAVERSAL FUNCTIONS:
- R3MeshVertex *VertexOnEdge(const R3MeshEdge *edge) const;
-
Returns any vertex on edge:
- R3MeshVertex *VertexOnEdge(const R3MeshEdge *edge, int k) const;
-
Returns kth vertex on edge:
- R3MeshVertex *VertexAcrossEdge(const R3MeshEdge *edge, const R3MeshVertex *vertex) const;
-
Returns vertex across edge:
- R3MeshVertex *VertexBetweenEdges(const R3MeshEdge *edge1, const R3MeshEdge *edge2) const;
-
Returns vertex between two edges (or NULL if there is none):
- R3MeshVertex *VertexOnEdge(const R3MeshEdge *edge, const R3MeshFace *face, RNDirection dir = RN_CCW) const;
-
Returns vertex of edge in dir with respect to face:
- R3MeshFace *FaceOnEdge(const R3MeshEdge *edge) const;
-
Returns any face on edge:
- R3MeshFace *FaceOnEdge(const R3MeshEdge *edge, int k) const;
-
Returns kth face on edge:
- R3MeshFace *FaceOnEdge(const R3MeshEdge *edge, const R3MeshVertex *vertex, RNDirection dir = RN_CCW) const;
-
Returns face on edge in dir with respect to vertex:
- R3MeshFace *FaceBetweenEdges(const R3MeshEdge *edge1, const R3MeshEdge *edge2) const;
-
Returns the face between two edges (or NULL if there is none):
- R3MeshFace *FaceAcrossEdge(const R3MeshEdge *edge, const R3MeshFace *face) const;
-
Returns face across edge:
-
-
FACE TRAVERSAL FUNCTIONS:
- R3MeshVertex *VertexOnFace(const R3MeshFace *face) const;
-
Returns any vertex on face:
- R3MeshVertex *VertexOnFace(const R3MeshFace *face, int k) const;
-
Returns kth vertex on face:
- R3MeshVertex *VertexOnFace(const R3MeshFace *face, const R3MeshVertex *vertex, RNDirection dir = RN_CCW) const;
-
Returns vertex on face in dir with respect to vertex:
- R3MeshVertex *VertexOnFace(const R3MeshFace *face, const R3MeshEdge *edge, RNDirection dir = RN_CCW) const;
-
Returns vertex on face in dir with respect to edge:
- R3MeshVertex *VertexAcrossFace(const R3MeshFace *face, const R3MeshEdge *edge) const;
-
Returns the vertex across a triangle from an edge (the edge is the base and the vertex is the apex):
- R3MeshVertex *VertexBetweenFaces(const R3MeshFace *face1, const R3MeshFace *face2, RNDirection dir = RN_CCW) const;
-
Returns the vertex between two faces (in dir with respect to face1) or NULL if there is none:
- R3MeshEdge *EdgeOnFace(const R3MeshFace *face) const;
-
Returns any edge connected to face:
- R3MeshEdge *EdgeOnFace(const R3MeshFace *face, int k) const;
-
Returns kth edge connected to face:
- R3MeshEdge *EdgeOnFace(const R3MeshFace *face, const R3MeshVertex *vertex, RNDirection dir = RN_CCW) const;
-
Returns edge on face in dir with respect to vertex:
- R3MeshEdge *EdgeOnFace(const R3MeshFace *face, const R3MeshEdge *edge, RNDirection dir = RN_CCW) const;
-
Return edge on face in dir with respect to edge:
- R3MeshEdge *EdgeAcrossFace(const R3MeshFace *face, const R3MeshVertex *vertex) const;
-
Returns the edge across a triangle from a vertex (the edge is the base and the vertex is the apex):
- R3MeshEdge *EdgeBetweenFaces(const R3MeshFace *face1, const R3MeshFace *face2) const;
-
Returns the edge between two faces (or NULL if there is none):
- R3MeshFace *FaceOnFace(const R3MeshFace *face) const;
-
Returns any face connected to face:
- R3MeshFace *FaceOnFace(const R3MeshFace *face, int k) const;
-
Returns kth face connected to face:
-
-
TOPOLOGY QUERY FUNCTIONS:
- RNBoolean IsVertexOnEdge(const R3MeshVertex *vertex, const R3MeshEdge *edge) const;
-
Returns whether vertex lies on edge:
- RNBoolean IsVertexOnFace(const R3MeshVertex *vertex, const R3MeshFace *face) const;
-
Returns whether vertex lies on face:
- RNBoolean IsEdgeOnFace(const R3MeshEdge *edge, const R3MeshFace *face) const;
-
Returns whether edge lies on face:
- RNBoolean IsVertexOnMesh(const R3MeshVertex *vertex) const;
-
Returns whether vertex is part of mesh:
- RNBoolean IsEdgeOnMesh(const R3MeshEdge *edge) const;
-
Returns whether edge is part of mesh:
- RNBoolean IsFaceOnMesh(const R3MeshFace *face) const;
-
Returns whether face is part of mesh:
- void FindConnectedFaces(R3MeshFace *seed, RNArray& faces);
-
Fill array with faces in same connected component as seed:
-
-
TOPOLOGY MANIPULATION FUNCTIONS:
- virtual R3MeshVertex *CreateVertex(const R3Point& position, R3MeshVertex *vertex = NULL);
-
Create a new vertex at a position (compute normal):
- virtual R3MeshVertex *CreateVertex(const R3Point& position, const R3Vector& normal, R3MeshVertex *vertex = NULL);
-
Create a new vertex at a position with a given normal:
- virtual R3MeshEdge *CreateEdge(R3MeshVertex *v1, R3MeshVertex *v2, R3MeshEdge *edge = NULL);
-
Create a new edge between two vertices:
- virtual R3MeshFace *CreateFace(R3MeshVertex *v1, R3MeshVertex *v2, R3MeshVertex *v3, R3MeshFace *face = NULL);
-
Create a face with vertices (v1, v2, v3):
- virtual R3MeshFace *CreateFace(R3MeshEdge *e1, R3MeshEdge *e2, R3MeshEdge *e3, R3MeshFace *face = NULL);
-
Create a face with edges (e1, e2, e3):
- virtual R3MeshFace *CreateFace(R3MeshVertex *v1, R3MeshVertex *v2, R3MeshVertex *v3,
- R3MeshEdge *e1, R3MeshEdge *e2, R3MeshEdge *e3, R3MeshFace *face = NULL);
-
Create a face with vertices (v1, v2, v3) and edges (e1, e2, e3):
- virtual void DeleteVertex(R3MeshVertex *v);
-
Delete a vertex and all edges/faces attached to it:
- virtual void DeleteEdge(R3MeshEdge *e);
-
Delete an edge (attached vertices are unaffected, attached faces are deleted):
- virtual void DeleteFace(R3MeshFace *f);
-
Delete a face (attached vertices and edges are unaffected):
- virtual R3MeshVertex *MergeVertex(R3MeshVertex *v1, R3MeshVertex *v2);
-
Merge vertex v2 into vertex v1 (v2 is deleted):
- virtual void MergeCoincidentVertices(RNLength epsilon = -1.0);
-
Merge all vertices within epsilon of each other (negative epsilon says "select epsilon automatically"):
- virtual R3MeshVertex *CollapseEdge(R3MeshEdge *edge, const R3Point& point);
-
Collapses an edge into a vertex at point:
- virtual R3MeshVertex *CollapseFace(R3MeshFace *face, const R3Point& point);
-
Collapses a face into a vertex at point:
- virtual R3MeshVertex *CollapseEdge(R3MeshEdge *edge);
-
Collapses an edge into a vertex at point:
- virtual R3MeshVertex *CollapseFace(R3MeshFace *face);
-
Collapses a face into a vertex at point:
- virtual R3MeshVertex *SplitEdge(R3MeshEdge *edge, const R3Point& point, R3MeshEdge **e0 = NULL, R3MeshEdge **e1 = NULL);
-
Creates a vertex at point, and inserts it into an edge, returns new vertex and edges (in e0-e1):
- virtual R3MeshVertex *SplitEdge(R3MeshEdge *edge, const R3Plane& plane);
-
Creates a vertex at intersection with plane, and inserts it into an edge:
- virtual R3MeshVertex *SubdivideEdge(R3MeshEdge *edge);
-
Splits edge at midpoint:
- virtual int SwapEdge(R3MeshEdge *edge);
-
Swap edge to use vertices across from adjacent faces:
- virtual void FlipEdge(R3MeshEdge *edge);
-
Reverse direction of edge (not important for most applications):
- virtual void FlipFace(R3MeshFace *face);
-
Reverses orientation of face:
- virtual R3MeshVertex *SplitFace(R3MeshFace *face, const R3Point& point,
- R3MeshFace **f0 = NULL, R3MeshFace **f1 = NULL, R3MeshFace **f2 = NULL);
-
Creates a new vertex at point, removes face, and builds new faces between edges and new vertices, returns new vertex and faces (in f0-f2):
- virtual R3MeshFace *SubdivideFace(R3MeshFace *face);
-
Splits face into four by subdividing each edge at midpoint (returns middle face):
-
-
DRAW FUNCTIONS:
- virtual void Draw(void) const;
-
Draws the faces:
- virtual void DrawVertices(void) const;
-
Draws the vertices:
- virtual void DrawEdges(void) const;
-
Draws the edges:
- virtual void DrawFaces(void) const;
-
Draws the faces:
- virtual void DrawVertexIDs(void) const;
-
Draws the vertex IDs into color buffer:
- virtual void DrawEdgeIDs(void) const;
-
Draws the edge IDs into color buffer:
- virtual void DrawFaceIDs(void) const;
-
Draws the face IDs into color buffer:
- virtual void DrawVertex(R3MeshVertex *vertex) const;
-
Draws one vertex:
- virtual void DrawEdge(R3MeshEdge *edge) const;
-
Draws one edge:
- virtual void DrawFace(R3MeshFace *face) const;
-
Draws one face:
-
-
INTERSECT FUNCTIONS:
- R3MeshType Intersection(const R3Ray& ray, R3MeshIntersection *intersection = NULL) const;
-
Returns first intersection along ray:
- R3MeshType Intersection(const R3Ray& ray, R3MeshFace *face, R3MeshIntersection *intersection = NULL) const;
-
Returns intersection with face along ray:
-
-
GEOMETRIC QUERY FUNCTIONS:
- R3Point ClosestPointOnEdge(const R3MeshEdge *edge, const R3Point& point) const;
-
Returns closest point on edge:
- R3Point ClosestPointOnFace(const R3MeshFace *face, const R3Point& point) const;
-
Returns closest point on face:
- R3Point RandomPointOnFace(const R3MeshFace *face) const;
-
Returns random point on face:
-
-
I/O FUNCTIONS:
- int ReadFile(const char *filename);
-
Loads data structure from a file, returns number of faces created (0 is error):
- int ReadObjFile(const char *filename);
-
Loads data structure from Wavefront file (.obj), returns number of faces created (0 is error):
- int ReadOffFile(const char *filename);
-
Loads data structure from OFF (.off) file, returns number of faces created (0 is error):
- int ReadRayFile(const char *filename);
-
Loads data structure from ray file (.ray), returns number of faces created (0 is error):
- int ReadPlyFile(const char *filename);
-
Loads data structure from ply file (.ply), returns number of faces created (0 is error):
- int ReadCattFile(const char *filename);
-
Loads data structure from a Catt acoustic file (.cat), returns number of faces created (0 is error):
- int ReadIfsFile(const char *filename);
-
Loads data structure from ifs file (.ifs), returns number of faces created (0 is error):
- int ReadSTLFile(const char *filename);
-
Loads data structure from STL file (.stl), returns number of faces created (0 is error):
- int ReadVRMLFile(const char *filename);
-
Loads data structure from VRML file (.wrl), returns number of faces created (0 is error):
- int WriteFile(const char *filename);
-
Writes a file, returns number of faces written (0 is error):
- int WriteRayFile(const char *filename);
-
Writes a ray file, returns number of faces written (0 is error):
- int WritePlyFile(const char *filename);
-
Writes a PLY file, returns number of faces written (0 is error):
- int WriteObjFile(const char *filename);
-
Writes a Wavefront OBJ file, returns number of faces written (0 is error):
- int WriteOffFile(const char *filename);
-
Writes a OFF (.off) file, returns number of faces written (0 is error):
- int WriteCattFile(const char *filename);
-
Writes a Catt Acoustics (.cat) file, returns number of faces written (0 is error):
- int WriteIfsFile(const char *filename);
-
Writes a IFS (.ifs) file, returns number of faces written (0 is error):
- int WriteSTLFile(const char *filename);
-
Writes a STL (.stl) file, returns number of faces written (0 is error):
-
-
DEBUG FUNCTIONS:
- virtual RNBoolean IsValid(void) const;
-
Returns whether data structure is valid:
- virtual RNBoolean IsValid(R3MeshVertex *vertex) const;
-
Returns whether vertex data structure is valid:
- virtual RNBoolean IsValid(R3MeshEdge *edge) const;
-
Returns whether edge data structure is valid:
- virtual RNBoolean IsValid(R3MeshFace *face) const;
-
Returns whether face data structure is valid:
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor/destructors:
- R3MeshSearchTree(R3Mesh *mesh);
- ~R3MeshSearchTree(void);
-
-
Property functions:
- const R3Box& BBox(void) const;
-
-
Insert/delete functions:
- void InsertFace(R3MeshFace *face);
- void Empty(void);
-
-
Find mesh feature closest to a query point:
- void FindClosest(const R3Point& query, R3MeshIntersection& closest,
- RNScalar min_distance = 0, RNScalar max_distance = RN_INFINITY,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *) = NULL,
- void *compatible_data = NULL);
-
-
Find mesh feature closest to a query point and normal:
- void FindClosest(const R3Point& query, const R3Vector& normal, R3MeshIntersection& closest,
- RNScalar min_distance = 0, RNScalar max_distance = RN_INFINITY,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *) = NULL,
- void *compatible_data = NULL);
-
-
Find all mesh features with distance from a query point:
- void FindAll(const R3Point& query, RNArray& hits,
- RNScalar min_distance = 0, RNScalar max_distance = RN_INFINITY,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *) = NULL,
- void *compatible_data = NULL);
-
-
Find all mesh features with distance from a query point and normal:
- void FindAll(const R3Point& query, const R3Vector& normal, RNArray& hits,
- RNScalar min_distance = 0, RNScalar max_distance = RN_INFINITY,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *) = NULL,
- void *compatible_data = NULL);
-
-
Visualization/debugging functions:
- int NNodes(void) const;
- void Outline(void) const;
- void Print(void) const;
-
-
Internal manipulations functions:
- void Empty(R3MeshSearchTreeNode *node);
-
-
Internal insert functions:
- void InsertFace(R3MeshSearchTreeFace *face, R3MeshSearchTreeNode *node, const R3Box& node_box, int depth);
-
-
Internal closest point search functions:
- void FindClosest(const R3Point& query, const R3Vector& normal, R3MeshIntersection& closest,
- RNScalar min_distance_squared, RNScalar& max_distance_squared,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), void *compatible_data,
- R3MeshSearchTreeNode *node, const R3Box& node_box) const;
- void FindClosest(const R3Point& query, const R3Vector& normal, R3MeshIntersection& closest,
- RNScalar min_distance_squared, RNScalar& max_distance_squared,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), void *compatible_data,
- R3MeshFace *face) const;
-
-
Internal all point search functions:
- void FindAll(const R3Point& query, const R3Vector& normal, RNArray& hits,
- RNScalar min_distance_squared, RNScalar max_distance_squared,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), void *compatible_data,
- R3MeshSearchTreeNode *node, const R3Box& node_box) const;
- void FindAll(const R3Point& query, const R3Vector& normal, RNArray& hits,
- RNScalar min_distance_squared, RNScalar max_distance_squared,
- int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), void *compatible_data,
- R3MeshFace *face) const;
-
-
Internal visualization and debugging functions:
- void Outline(R3MeshSearchTreeNode *node, const R3Box& node_box) const;
- int Print(R3MeshSearchTreeNode *node, int depth) const;
-
-
Internal utility functions:
- RNScalar DistanceSquared(const R3Point& query, const R3Box& box, RNScalar max_distance_squared) const;
- RNScalar DistanceSquared(const R3Point& query, const R3Point& point) const;
-
-
Internal data:
- R3Mesh *mesh;
- R3MeshSearchTreeNode *root;
- int nnodes;
- RNMark mark;
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor functions:
- R3Plane(void);
- R3Plane(const R3Plane& plane);
- R3Plane(RNScalar a, RNScalar b, RNScalar c, RNScalar d);
- R3Plane(const RNScalar array[4]);
- R3Plane(const R3Vector& normal, RNScalar d);
- R3Plane(const R3Point& point, const R3Vector& normal);
- R3Plane(const R3Point& point, const R3Line& line);
- R3Plane(const R3Point& point, const R3Vector& vector1, const R3Vector& vector2);
- R3Plane(const R3Point& point1, const R3Point& point2, const R3Point& point3);
- R3Plane(const RNArray& points);
-
-
Property functions/operators:
- const RNScalar A(void) const;
- const RNScalar B(void) const;
- const RNScalar C(void) const;
- const RNScalar D(void) const;
- const RNScalar operator[](int i) const;
- const R3Point Point(void) const;
- const R3Vector& Normal(void) const;
- const RNBoolean IsZero(void) const;
- const RNBoolean operator==(const R3Plane& plane) const;
- const RNBoolean operator!=(const R3Plane& plane) const;
-
-
Manipulation functions/operators:
- void Flip(void);
- void Mirror(const R3Plane& plane);
- void Translate(const R3Vector& vector);
- void Reposition(const R3Point& point);
- void Align(const R3Vector& normal);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(const R3Point& point, const R3Vector& normal);
-
-
Draw functions/operators:
- void Draw(void) const;
-
-
Arithmetic functions/operators:
- R3Plane operator-(void) const;
-
-
Undocumented functions/operators:
- RNScalar& operator[](int i);
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor/destructor functions:
- R3Point(void);
- R3Point(const R3Point& point);
- R3Point(RNCoord x, RNCoord y, RNCoord z);
- R3Point(const RNCoord array[3]);
-
-
Property functions/operators:
- const RNCoord X(void) const;
- const RNCoord Y(void) const;
- const RNCoord Z(void) const;
- const RNCoord Coord(RNDimension dim) const;
- const RNCoord operator[](RNDimension dim) const;
- const RNCoord *Coords(void) const;
- const RNBoolean IsZero(void) const;
- const RNBoolean IsFinite(void) const;
- const R3Vector Vector(void) const;
- const R3Box BBox(void) const;
- const R3Sphere BSphere(void) const;
-
-
Relationship functions/operators:
- const RNBoolean Collinear(const R3Point& point1, const R3Point& point2) const;
- const RNBoolean operator==(const R3Point& point) const;
- const RNBoolean operator!=(const R3Point& point) const;
-
-
Manipulation functions/operators:
- void X(RNCoord x);
- void Y(RNCoord y);
- void Z(RNCoord z);
- void SetCoord(RNDimension dim, RNCoord coord);
- void Translate(const R3Vector& vector);
- void Project(const R3Line& line);
- void Project(const R3Plane& plane);
- void Mirror(const R3Plane& plane);
- void Rotate(const R3Vector& axis, RNAngle theta);
- void Rotate(const R3Line& axis, RNAngle theta);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(RNCoord x, RNCoord y, RNCoord z);
-
-
Draw functions/operators:
- void Draw(void) const;
-
-
Assignment operators:
- R3Point& operator=(const R3Point& point);
- R3Point& operator+=(const R3Point& point);
- R3Point& operator+=(const R3Vector& vector);
- R3Point& operator-=(const R3Vector& vector);
- R3Point& operator*=(const RNScalar a);
- R3Point& operator/=(const RNScalar a);
-
-
Arithmetic operators:
- friend R3Point operator-(const R3Point& point);
- friend R3Point operator+(const R3Point& point1, const R3Point& point2);
- friend R3Point operator+(const R3Point& point, const R3Vector& vector);
- friend R3Point operator+(const R3Vector& vector, const R3Point& point);
- friend R3Vector operator-(const R3Point& point1, const R3Point& point2);
- friend R3Point operator-(const R3Point& point, const R3Vector& vector);
- friend R3Point operator*(const R3Point& point, const RNScalar a);
- friend R3Point operator*(const RNScalar a, const R3Point& point);
- friend R3Point operator/(const R3Point& point, const RNScalar a);
-
-
Undocumented functions/operators:
- RNCoord& operator[](RNDimension dim);
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor functions:
- R3Ray(void);
- R3Ray(const R3Ray& ray);
- R3Ray(const R3Point& point, const R3Vector& vector, RNBoolean normalized = FALSE);
- R3Ray(const R3Point& point1, const R3Point& point2);
- R3Ray(RNCoord x1, RNCoord y1, RNCoord z1, RNCoord x2, RNCoord y2, RNCoord z2);
-
-
Property functions/operators:
- const R3Point& Start(void) const;
- const R3Vector& Vector(void) const;
- const R3Line& Line(void) const;
- const R3Point Point(RNScalar t) const;
- const RNScalar T(const R3Point& point) const;
- const RNBoolean IsZero(void) const;
- const RNBoolean operator==(const R3Ray& ray) const;
- const RNBoolean operator!=(const R3Ray& ray) const;
-
-
Manipulation functions/operators:
- void Flip(void);
- void Mirror(const R3Plane& plane);
- void Translate(const R3Vector& vector);
- void Reposition(const R3Point& point);
- void Align(const R3Vector& vector, RNBoolean normalized = FALSE);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(const R3Point& point, const R3Vector& vector, RNBoolean normalized = FALSE);
-
-
Draw functions/operators:
- void Draw(void) const;
-
-
Arithmetic functions/operators:
- R3Ray operator-(void) const;
-
-
Base Classes:
-
Public Base Classes:
- R3Base
-
Member Functions:
-
Constructors/destructors:
-
Base Classes:
-
Public Base Classes:
- R3Shape
-
Member Functions:
-
Constructors/destructors ???:
- R3Solid(void);
- ~R3Solid(void);
-
-
Shape property functions/operators:
- const RNBoolean IsSolid(void) const;
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructor functions:
- R3Span(void);
- R3Span(const R3Span& span);
- R3Span(const R3Point& point, const R3Vector& vector);
- R3Span(const R3Point& point1, const R3Point& point2);
- R3Span(RNCoord x1, RNCoord y1, RNCoord z1, RNCoord x2, RNCoord y2, RNCoord z2);
-
-
Property functions/operators:
- const R3Point& Start(void) const;
- const R3Point& End(void) const;
- const R3Vector& Vector(void) const;
- const R3Point Point(int k) const;
- const R3Point Point(RNScalar t) const;
- const R3Point& operator[](int k) const;
- const R3Ray& Ray(void) const;
- const R3Line& Line(void) const;
- const R3Point Midpoint(void) const;
- const R3Point Centroid(void) const;
- const R3Box BBox(void) const;
- const R3Sphere BSphere(void) const;
- const RNLength Length(void) const;
- const RNScalar T(const R3Point& point) const;
- const RNBoolean IsPoint(void) const;
- const RNBoolean operator==(const R3Span& span) const;
- const RNBoolean operator!=(const R3Span& span) const;
-
-
Manipulation functions/operators:
- void Flip(void);
- void Mirror(const R3Plane& plane);
- void Translate(const R3Vector& vector);
- void Reposition(int k, const R3Point& point);
- void Align(const R3Vector& vector);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(const R3Point& point1, const R3Point& point2);
- RNClassID Clip(const R3Plane& plane);
-
-
Draw functions/operators:
- void Draw(void) const;
-
-
Arithmetic functions/operators:
- R3Span operator-(void) const;
-
-
Base Classes:
-
Public Base Classes:
- R3Solid
-
Member Functions:
-
Constructor functions:
- R3Sphere(void);
- R3Sphere(const R3Sphere& sphere);
- R3Sphere(const R3Point& center, RNLength radius);
-
-
Sphere property functions/operators:
- const R3Point& Center(void) const;
- const RNLength Radius(void) const;
- const RNBoolean IsEmpty(void) const;
- const RNBoolean IsFinite(void) const;
-
-
Shape property functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const ;
- virtual const RNBoolean IsPlanar(void) const ;
- virtual const RNBoolean IsConvex(void) const ;
- virtual const RNInterval NFacets(void) const;
- virtual const RNArea Area(void) const;
- virtual const RNVolume Volume(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Empty(void);
- virtual void Translate(const R3Vector& vector);
- virtual void Reposition(const R3Point& center);
- virtual void Resize(RNLength radius);
- virtual void Transform(const R3Transformation& transformation);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Sphere);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Sphere);
-
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructors:
- R3SphericalGrid(int phi_resolution = 0, int theta_resolution = 0, int radius_resolution = 0);
- R3SphericalGrid(const R3SphericalGrid& grid);
- ~R3SphericalGrid(void);
-
-
Grid property functions:
- int NEntries(void) const;
- int PhiResolution(void) const;
- int ThetaResolution(void) const;
- int RadiusResolution(void) const;
- int Resolution(int dim) const;
- RNScalar Sum(void) const;
- RNScalar Maximum(void) const;
- RNScalar Minimum(void) const;
- RNInterval Range(void) const;
- RNScalar L1Norm(void) const;
- RNScalar L2Norm(void) const;
- RNScalar Volume(void) const;
- RNScalar Integral(RNScalar (*f)(RNScalar)) const;
- RNScalar Integral(const R3SphericalGrid& g, RNScalar (*f)(RNScalar, RNScalar)) const;
- int Cardinality(void) const;
- RNLength WorldRadius(void) const;
- R3Point WorldOrigin(void) const;
- R3Sphere WorldSphere(void) const;
-
-
Transformation property functions:
- const R3Affine& WorldToGridTransformation(void) const;
- const R3Affine& GridToWorldTransformation(void) const;
- RNScalar WorldToGridScaleFactor(void) const;
- RNScalar GridToWorldScaleFactor(void) const;
-
-
Grid value access functions:
- RNScalar GridValue(int i, int j, int k) const;
- RNScalar GridValue(RNCoord x, RNCoord y, RNCoord z) const;
- RNScalar GridValue(const R3Point& grid_point) const;
- RNScalar WorldValue(RNCoord x, RNCoord y, RNCoord z) const;
- RNScalar WorldValue(const R3Point& world_point) const;
- RNScalar& operator()(int i, int j,int k);
-
-
Grid manipulation functions:
- void Abs(void);
- void Sqrt(void);
- void Square(void);
- void Negate(void);
- void Invert(void);
- void Normalize(void);
- void Clear(RNScalar value = 0);
- void Add(RNScalar value);
- void Add(const R3SphericalGrid& grid);
- void Subtract(RNScalar value);
- void Subtract(const R3SphericalGrid& grid);
- void Multiply(RNScalar value);
- void Multiply(const R3SphericalGrid& grid);
- void Divide(RNScalar value);
- void Divide(const R3SphericalGrid& grid);
- void Threshold(RNScalar threshold, RNScalar low, RNScalar high);
- void SetGridValue(int i, int j, int k, RNScalar value);
- void AddGridValue(int i, int j, int k, RNScalar value);
- void Add(const R3Grid& grid);
-
-
Arithmetic operators:
- R3SphericalGrid& operator=(const R3SphericalGrid& grid);
- R3SphericalGrid& operator+=(RNScalar scale);
- R3SphericalGrid& operator+=(const R3SphericalGrid& grid);
- R3SphericalGrid& operator-=(RNScalar scale);
- R3SphericalGrid& operator-=(const R3SphericalGrid& grid);
- R3SphericalGrid& operator*=(RNScalar scale);
- R3SphericalGrid& operator*=(const R3SphericalGrid& grid);
- R3SphericalGrid& operator/=(RNScalar scale);
- R3SphericalGrid& operator/=(const R3SphericalGrid& grid);
-
-
Rasterization functions:
- void RasterizeGridPoint(RNCoord x, RNCoord y, RNCoord z, RNScalar value);
- void RasterizeGridPoint(const R3Point& point, RNScalar value);
- void RasterizeWorldPoint(RNCoord x, RNCoord y, RNCoord z, RNScalar value);
- void RasterizeWorldPoint(const R3Point& point, RNScalar value);
-
-
Relationship functions:
- RNScalar Dot(const R3SphericalGrid& grid) const;
- RNScalar L1Distance(const R3SphericalGrid& grid) const;
- RNScalar L2Distance(const R3SphericalGrid& grid) const;
- RNScalar L2DistanceSquared(const R3SphericalGrid& grid) const;
-
-
Transformation manipulation functions:
- void SetWorldToGridTransformation(const R3Affine& affine);
- void SetWorldToGridTransformation(const R3Box& world_box);
- void SetWorldToGridTransformation(const R3Point& world_origin, const R3Vector& world_axis1, const R3Vector& world_axis2, RNLength world_radius);
-
-
Transformation utility functions:
- R3Point GridPosition(const R3Point& world_point) const;
- R3Point GridPosition(RNCoord x, RNCoord y, RNCoord z) const;
- R3Point WorldPosition(const R3Point& grid_point) const;
- R3Point WorldPosition(RNCoord x, RNCoord y, RNCoord z) const;
-
-
I/O functions:
- int ReadFile(const char *filename);
- int WriteFile(const char *filename) const;
- int Read(FILE *fp = NULL);
- int Write(FILE *fp = NULL) const;
- int Print(FILE *fp = NULL) const;
-
-
Debugging functions:
- const RNScalar *GridValues(void) const;
-
-
Base Classes:
-
Public Base Classes:
- R3Shape
-
Member Functions:
-
Constructors/destructors ???:
- R3Surface(void);
- ~R3Surface(void);
-
-
Shape property functions/operators:
- const RNBoolean IsSurface(void) const;
-
Base Classes:
-
Public Base Classes:
- R3Base
-
Member Functions:
-
Constructor functions:
- R3Triad(void);
- R3Triad(const R3Triad& triad);
- R3Triad(const R3Vector& xaxis, const R3Vector& yaxis, const R3Vector& zaxis);
- R3Triad(const R3Vector& towards, const R3Vector& up);
-
-
Property functions/operators:
- const R4Matrix Matrix(void) const;
- const R4Matrix InverseMatrix(void) const;
- const R3Vector& Axis(RNDimension dim) const;
- const R3Vector& operator[](RNDimension dim) const;
- const RNBoolean operator==(const R3Triad& triad) const;
- const RNBoolean operator!=(const R3Triad& triad) const;
-
-
Manipulation functions/operators:
- void Normalize(void);
- void Rotate(RNAxis axis, RNAngle radians);
- void Rotate(const R3Vector& vector, RNAngle radians);
- void Rotate(const R3Vector& from, const R3Vector& to);
- void Mirror(const R3Plane& plane);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- R3Triad& operator=(const R3Triad& triad);
-
-
Draw functions/operators:
- void Draw(void) const;
- void Outline(void) const;
-
-
Base Classes:
-
Public Base Classes:
- R3Surface
-
Member Functions:
-
Constructor functions:
- R3TriangleArray(void);
- R3TriangleArray(const R3TriangleArray& array);
- R3TriangleArray(const RNArray& vertices, const RNArray& triangles);
-
-
Triangle array properties:
- const R3Box& Box(void) const;
-
-
Vertex access functions/operators:
- int NVertices(void) const;
- R3TriangleVertex *Vertex(int index) const;
-
-
Triangle access functions/operators:
- int NTriangles(void) const;
- R3Triangle *Triangle(int index) const;
-
-
Shape property functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsPlanar(void) const;
- virtual const RNBoolean IsConvex(void) const;
- virtual const RNInterval NFacets(void) const;
- virtual const RNLength Length(void) const;
- virtual const RNArea Area(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Flip(void);
- virtual void Mirror(const R3Plane& plane);
- virtual void Transform(const R3Transformation& transformation);
- virtual void MoveVertex(R3TriangleVertex *vertex, const R3Point& position);
- virtual void Update(void);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3TriangleArray);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3TriangleArray);
-
-
Base Classes:
-
Public Base Classes:
- None
-
Member Functions:
-
Constructors:
- R3TriangleVertex(void);
- R3TriangleVertex(const R3TriangleVertex& vertex);
- R3TriangleVertex(const R3Point& position);
- R3TriangleVertex(const R3Point& position, const R3Vector& normal);
- R3TriangleVertex(const R3Point& position, const R2Point& texcoords);
- R3TriangleVertex(const R3Point& position, const R3Vector& normal, const R2Point& texcoords);
-
-
Property functions/operators:
- const R3Point& Position(void) const;
- const R3Vector& Normal(void) const;
- const R2Point& TextureCoords(void) const;
- const RNFlags Flags(void) const;
- const RNMark Mark(void) const;
-
-
Manipulation functions/operators:
- void Mirror(const R3Plane& plane);
- void Transform(const R3Transformation& transformation);
- void SetPosition(const R3Point& position);
- void SetNormal(const R3Vector& normal);
- void SetTextureCoords(const R2Point& texcoords);
- void SetMark(RNMark mark);
-
- R3Point position;
- R3Vector normal;
- R2Point texcoords;
- RNFlags flags;
- RNMark mark;
-
Base Classes:
-
Public Base Classes:
- R3Surface
-
Member Functions:
-
Constructor functions:
- R3Triangle(void);
- R3Triangle(const R3Triangle& triangle);
- R3Triangle(R3TriangleVertex *v0, R3TriangleVertex *v1, R3TriangleVertex *v2);
- R3Triangle(R3TriangleVertex *vertices[3]);
-
-
Vertex access functions/operators:
- R3TriangleVertex *Vertex(int index) const;
- R3TriangleVertex *V0(void) const;
- R3TriangleVertex *V1(void) const;
- R3TriangleVertex *V2(void) const;
-
-
Triangle property functions/operators:
- const R3Plane& Plane(void) const;
- const R3Vector& Normal(void) const;
- const R3Box& Box(void) const;
- const RNFlags Flags(void) const;
- const RNMark Mark(void) const;
- const RNBoolean IsFinite(void) const;
- const RNBoolean IsDegenerate(void) const;
-
-
Shape property functions/operators:
- virtual const RNBoolean IsPoint(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsPlanar(void) const;
- virtual const RNBoolean IsConvex(void) const;
- virtual const RNInterval NFacets(void) const;
- virtual const RNLength Length(void) const;
- virtual const RNArea Area(void) const;
- virtual const R3Point Centroid(void) const;
- virtual const R3Shape& BShape(void) const;
- virtual const R3Box BBox(void) const;
- virtual const R3Sphere BSphere(void) const;
-
-
Manipulation functions/operators:
- virtual void Flip(void);
- virtual void Transform(const R3Transformation& transformation);
- virtual void Mirror(const R3Plane& plane);
- virtual void Reset(R3TriangleVertex *v1, R3TriangleVertex *v2, R3TriangleVertex *v3);
- virtual void Reset(R3TriangleVertex *vertices[3]);
- virtual void SetMark(RNMark mark);
- virtual void Update(void);
-
-
Draw functions/operators:
- virtual void Draw(const R3DrawFlags draw_flags = R3_DEFAULT_DRAW_FLAGS) const;
-
-
Arithmetic functions/operators:
- R3Triangle operator-(void) const;
-
-
Standard shape definitions:
- RN_CLASS_TYPE_DECLARATIONS(R3Triangle);
- R3_SHAPE_RELATIONSHIP_DECLARATIONS(R3Triangle);
-
-
Base Classes:
-
Public Base Classes:
- R3Base
-
Member Functions:
-
Constructor functions:
- R3Vector(void);
- R3Vector(const R3Vector& vector);
- R3Vector(RNCoord x, RNCoord y, RNCoord z);
- R3Vector(const RNCoord array[3]);
- R3Vector(RNAngle pitch, RNAngle yaw);
-
-
Property functions/operators:
- const RNCoord X(void) const;
- const RNCoord Y(void) const;
- const RNCoord Z(void) const;
- const RNCoord Coord(RNDimension dim) const;
- const RNCoord operator[](RNDimension dim) const;
- const RNCoord *Coords(void) const;
- const RNBoolean IsZero(void) const;
- const RNBoolean IsFinite(void) const;
- const RNBoolean IsNormalized(void) const;
- const RNLength Length(void) const;
- const R3Point Point(void) const;
- const RNSextant Sextant(void) const;
- const RNOctant Octant(void) const;
- const RNDimension MinDimension(void) const;
- const RNDimension MaxDimension(void) const;
-
-
Relationship functions/operators:
- const RNBoolean operator==(const R3Vector& vector) const;
- const RNBoolean operator!=(const R3Vector& vector) const;
- const RNScalar Dot(const R3Vector& vector) const;
-
-
Manipulation functions/operators:
- void X(RNCoord x);
- void Y(RNCoord y);
- void Z(RNCoord z);
- void SetCoord(RNDimension dim, RNCoord coord);
- void Flip(void);
- void Normalize(void);
- void Cross(const R3Vector& vector);
- void Rotate(const R3Vector& axis, RNAngle theta);
- void Project(const R3Vector& vector);
- void Project(const R3Plane& plane);
- void Mirror(const R3Plane& plane);
- void Transform(const R3Transformation& transformation);
- void InverseTransform(const R3Transformation& transformation);
- void Reset(RNCoord x, RNCoord y, RNCoord z);
-
-
Draw functions/operators:
- void Draw(void) const;
- void Outline(void) const;
-
-
Assignment operators:
- R3Vector& operator=(const R3Vector& vector);
- R3Vector& operator+=(const R3Vector& vector);
- R3Vector& operator-=(const R3Vector& vector);
- R3Vector& operator*=(const RNScalar a);
- R3Vector& operator*=(const R3Vector& vector);
- R3Vector& operator/=(const RNScalar a);
- R3Vector& operator/=(const R3Vector& vector);
-
-
Arithmetic operators:
- friend R3Vector operator+(const R3Vector& vector);
- friend R3Vector operator-(const R3Vector& vector);
- friend R3Vector operator+(const R3Vector& vector1, const R3Vector& vector2);
- friend R3Vector operator-(const R3Vector& vector1, const R3Vector& vector2);
- friend R3Vector operator*(const R3Vector& vector1, const R3Vector& vector2);
- friend R3Vector operator*(const R3Vector& vector, const RNScalar a);
- friend R3Vector operator*(const RNScalar a, const R3Vector& vector);
- friend R3Vector operator/(const R3Vector& vector1, const R3Vector& vector2);
- friend R3Vector operator/(const R3Vector& vector, const RNScalar a);
- friend R3Vector operator%(const R3Vector& vector1, const R3Vector& vector2);
-
-
Undocumented functions/operators:
- RNCoord& operator[](RNDimension dim);
-
-
Base Classes:
-
Public Base Classes:
- R3Base
-
Member Functions:
-
Destructor function:
- virtual ~R3Transformation(void);
-
-
Property functions/operators:
- virtual const RNBoolean IsMirrored(void) const;
- virtual const RNBoolean IsLinear(void) const;
- virtual const RNBoolean IsAffine(void) const;
- virtual const RNBoolean IsIsotropic(void) const;
-
-
Application functions/operators:
- virtual void Apply(R3Vector& vector) const = 0;
- virtual void Apply(R3Point& point) const = 0;
- virtual void Apply(R3Transformation& transformation) const = 0;
- virtual void Apply(R3Affine& affine) const = 0;
- virtual void ApplyInverse(R3Vector& vector) const = 0;
- virtual void ApplyInverse(R3Point& point) const = 0;
- virtual void ApplyInverse(R3Transformation& transformation) const = 0;
- virtual void ApplyInverse(R3Affine& affine) const = 0;
- virtual void ApplyInverseTranspose(R3Vector& vector) const = 0;
- virtual void ApplyTranspose(R3Vector& vector) const = 0;
-
-
Manipulation functions/operators:
- virtual void Reset(const R3Transformation& transformation) = 0;
- virtual void Transform(const R3Transformation& transformation) = 0;
- virtual void InverseTransform(const R3Transformation& transformation) = 0;
-
-
Draw functions/operators:
- virtual void Load(void) const = 0;
- virtual void Draw(void) const = 0;
- virtual void Push(void) const = 0;
- virtual void Pop(void) const = 0;
-
-
Do not use these ???:
- virtual const RNScalar ScaleFactor(void) const;
-
Base Classes:
-
Public Base Classes:
- R3Base
-
Member Functions:
-
Constructor functions:
- R4Matrix(void);
- R4Matrix(const R4Matrix& matrix);
- R4Matrix(RNScalar a00, RNScalar a01, RNScalar a02, RNScalar a03,
- RNScalar a10, RNScalar a11, RNScalar a12, RNScalar a13,
- RNScalar a20, RNScalar a21, RNScalar a22, RNScalar a23,
- RNScalar a30, RNScalar a31, RNScalar a32, RNScalar a33);
- R4Matrix(const RNScalar* array);
-
-
Property functions/operators:
- const RNBoolean IsZero(void) const;
- const RNBoolean IsIdentity(void) const;
- const RNBoolean IsIsotropic(void) const;
- const RNBoolean HasTranslation(void) const;
- const RNBoolean HasScale(void) const;
- const RNBoolean HasRotation(void) const;
- const RNBoolean HasMirror(void) const;
- const RNScalar *operator[](int i) const;
- const RNScalar Determinant(void) const;
- const R4Matrix Transpose(void) const;
- const R4Matrix Inverse(void) const;
- const RNBoolean operator==(const R4Matrix& matrix) const;
- const RNBoolean operator!=(const R4Matrix& matrix) const;
-
-
Draw functions/operators:
- void Load(void) const;
- void Draw(void) const;
- void Push(void) const;
- void Pop(void) const;
-
-
Manipulation functions/operators:
- void Flip(void);
- void Invert(void);
- void XTranslate(RNScalar offset);
- void YTranslate(RNScalar offset);
- void ZTranslate(RNScalar offset);
- void Translate(RNScalar offset);
- void Translate(RNAxis axis, RNScalar offset);
- void Translate(const R3Vector& offset);
- void XScale(RNScalar scale);
- void YScale(RNScalar scale);
- void ZScale(RNScalar scale);
- void Scale(RNScalar scale);
- void Scale(RNAxis axis, RNScalar scale);
- void Scale(const R3Vector& scale);
- void XRotate(RNAngle radians);
- void YRotate(RNAngle radians);
- void ZRotate(RNAngle radians);
- void Rotate(const R3Vector& radians);
- void Rotate(RNAxis axis, RNAngle radians);
- void Rotate(const R3Vector& vector, RNAngle radians);
- void Rotate(const R3Vector& from, const R3Vector& to);
- void Transform(const R4Matrix& matrix);
- void Multiply(const R4Matrix& matrix);
- void Add(const R4Matrix& matrix);
- void Subtract(const R4Matrix& matrix);
-
-
Assignment operators:
- R4Matrix& operator=(const R4Matrix& matrix);
- R4Matrix& operator+=(const R4Matrix& matrix);
- R4Matrix& operator-=(const R4Matrix& matrix);
- R4Matrix& operator*=(RNScalar a);
- R4Matrix& operator*=(const R4Matrix& matrix);
- R4Matrix& operator/=(RNScalar a);
-
-
Arithmetic operators:
- friend R4Matrix operator-(const R4Matrix& matrix);
- friend R4Matrix operator+(const R4Matrix& matrix1, const R4Matrix& matrix2);
- friend R4Matrix operator-(const R4Matrix& matrix1, const R4Matrix& matrix2);
- friend R4Matrix operator*(RNScalar a, const R4Matrix& matrix);
- friend R4Matrix operator*(const R4Matrix& matrix, RNScalar a);
- friend R4Matrix operator*(const R4Matrix& matrix1, const R4Matrix& matrix2);
- friend R4Matrix operator/(const R4Matrix& matrix, RNScalar scale);
- friend R3Vector operator*(const R4Matrix& matrix, const R3Vector& vector);
- friend R3Point operator*(const R4Matrix& matrix, const R3Point& point);
-
-
Undocumented functions/operators:
- RNScalar *operator[](int i);
-
Click this to go back to list of GAPS packages.