SolidKit3D.Shape class

From Solid Graphics Wiki

Revision as of 01:10, 6 October 2009 by Rgrof (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search
SolidKit3D.Shape class
Namespace: SolidKit3D
Base type: (None)
Assembly: SolidKit.dll
Platform: .NET


The Shape class is representation of a triangle mesh.


Fields

Field name Type Description
Points SolidKit3D.PointList class Array of shape's points.
Triangles SolidKit3D.TriangleByRefList class Array of shape's triangles.

Methods

Method name Description
CreateBox Creates triangle mesh of a box shape.
CreateCone Creates triangle mesh of a cone shape.
CreateCylinder Creates triangle mesh of a cylinder shape.
CreateSphere Creates triangle mesh of sphere shape.
CreateTorus Creates triangle mesh of a torus shape.
Area Returns area of the shape surface.
Volume Ruturns volume of the shape. The volume is valid number only if the object's triangle mesh represents a solid without "surface skin" holes (This does not mean that the shape cannot have holes - it means that it's volume surface must not be missing any triangles).
MassCenter Returns mass center of the shape. The mass center is correctly calculated only if the shape object represents a solid object.
GetVolumeAndMassCenter Returns volume and mass center information for the shape. The information is correctly calculated only if the shape object represents a solid object.
BoundingBox Returns axis oriented bounding box of the shape.
Add Adds points and triangles of another shape object to the instance. The operator does no do any optimization such as removing common points from resulting shape - after it is finished the same point coordinates can be present in the shape's point array field multiple times.
Move Moves the shape point by specified vector.
Transform Transforms all shape points using given matrix.
Scale Scales all shape point coordinates by given factor.
AlignToGrid Aligns all shape points to specified grid.
SnapPoints Merges shape points which are withing specified distance to each other.
RemoveUnusedPoints Removes all unused points from the point array fieldd and updates point indexes of affected triangles.
InsertPoint Inserts a point onto the shape surface and modifies affected triangles.
CalculateNormals Calculates shape triangle normals.
Split If the shape consists of multiple separate objects then the Split method returns array of the individual shapes. If shape is already a single object then the return array will have just one object.
GetLeftmostPointIndex Returns index of the furthest shape point to the left side of specified plane.
GetLeftmostPoint Returns coordinates of the furthest shape point to the left side of specified plane.
GetRightmostPointIndex Returns index of the furthest shape point to the right side of specified plane.
GetRightmostPoint Returns coordinates of the furthest shape point to the right side of specified plane.
GetTriangle Returns specified shape triangle as Triangle struct object.
IsValidTopology Returns true if shape's topology is valid solid and therefore valid to perform constructive solid geometry operation on it.
Intersects Performs intersection test of given LineSegment or another shape wich the shape object instance.
LoadFromXML Loads the shape triangle mesh from specified XmlReader.
SaveToXML Appends the shape triangle mesh to MemoryBuffer as XML.
CreateNew Creates new shape object instance.


Below methods are part of the SolidKit Library Pro package only!



Method name Description
ReduceCollinearTriangles Reduces number of triangles in the shape's faces.
RemoveThinTriangles Removes thin triangles from the shape.
FlatSubdivide Does flat subdivision of all shape triangles.
SmoothSubdivide Does (Loop's) smooth subdivision of all shape triagles.
Mirror Mirrors the shape around specified plane.
RoundEdge (This method is in Alpha development stage!) Rounds specified shape edge.

See Also

   


SolidKit Library Documentation

Personal tools