Classes | |
struct | CPolygon |
struct | Tangent |
struct | Segment |
struct | ObjectColorProperties |
class | HierarchyHelp |
class | BaseObject |
class | CameraObject |
class | PointObject |
struct | CLine |
class | LineObject |
class | PolygonObject |
class | SplineLengthData |
class | SplineObject |
class | Safety |
struct | PolyInfo |
struct | NgonNeighbor |
struct | NgonNeighbor::NgonNeighborSegment |
class | Neighbor |
class | PolyTriangulate |
Macros | |
#define | MODE_ON |
#define | MODE_OFF |
#define | MODE_UNDEF |
#define | POLYOBJECT_VBO_VERTEX |
#define | POLYOBJECT_VBO_PHONG_NORMAL |
#define | POLYOBJECT_VBO_POLYGON_NORMAL |
#define | POLYOBJECT_VBO_DISPLACE_NORMAL |
#define | POLYOBJECT_VBO_STICK_TEXTURE |
#define | POLYOBJECT_VBO_COLOR |
#define | ToPoint(op) |
#define | ToPoly(op) |
#define | ToSpline(op) |
#define | POLY_TRIANG_CONSTRAINED_OUTLINE |
#define | POLY_TRIANG_QUADS |
#define | POLY_TRIANG_NGON |
#define | POLY_TRIANG_FORCE_VORONOI |
#define | POLY_TRIANG_FORCE_NGON |
#define | POLY_TRIANG_FILL_HOLES |
#define | TRIANGSTATE_SKIP_EDGE |
#define | TRIANGSTATE_MISSING_CONSTRAINT |
#define ToPoint | ( | op | ) |
Casts a BaseObject* to a PointObject*.
#define ToPoly | ( | op | ) |
Casts a BaseObject* to a PolygonObject*.
#define ToSpline | ( | op | ) |
Casts a BaseObject* to a SplineObject*.
BaseObject* GeneratePrimitive | ( | BaseDocument * | doc, |
Int32 | type, | ||
const BaseContainer & | bc, | ||
Float | lod, | ||
Bool | isoparm, | ||
BaseThread * | bt = nullptr |
||
) |
Creates a built-in Cinema 4D primitive objects.
[in] | doc | The document for the primitive object. The caller owns the pointed document. |
[in] | type | The primitive type: Primitive Types |
[in] | bc | The settings for the primitive. |
[in] | lod | The level of detail to use for the primitive. |
[in] | isoparm | Pass true to create a isoparm of the object. |
[in] | bt | The thread to test for a break or nullptr. The caller owns the pointed thread. |
BaseObject* GenerateSplinePrimitive | ( | BaseDocument * | doc, |
Int32 | type, | ||
const BaseContainer & | bc, | ||
Float | lod, | ||
BaseThread * | bt = nullptr |
||
) |
Creates a built-in Cinema 4D primitive spline objects.
[in] | doc | The document for the spline primitive object. The caller owns the pointed document. |
[in] | type | The spline primitive type: Spline Primitive Types |
[in] | bc | The settings for the spline primitive. |
[in] | lod | The level of detail to use for the primitive. |
[in] | bt | The thread to test for a break or nullptr. The caller owns the pointed thread. |
Calculates the normal of a polygon.
[in] | padr | The points array. |
[in] | v | The polygon. |
Helper function to modify a user chosen subdivision value.
Example:
[in] | val | The user chosen LOD value. |
[in] | lod | The LOD value, from BaseDocument::GetLOD(). |
[in] | min | The minimum LOD. |
[in] | max | The maximum LOD. |
Bool DisjointMesh | ( | PointObject * | op | ) |
Separates the mesh of the object to make each polygon/line segment independent.
Each polygon/line will be given its own points thereby separating them so they can be moved independently, such as the Explosion object.
[in] | op | The Point object to disjoint. The caller owns the pointed Point object. |
SplineObject* FitCurve | ( | Vector * | padr, |
Int32 | pcnt, | ||
Float | error, | ||
BaseThread * | bt | ||
) |
Creates a Spline object that has the best fit through the given points.
[in] | padr | The points to fit a curve to. The caller owns the pointed array. |
[in] | pcnt | The number of points in the point array padr. |
[in] | error | Sets how closely the curve must match the passed points. The range for this is 0 to MAXRANGE. The lower the value then the closer the curve will match. |
[in] | bt | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
Turns the polygon mesh into triangles.
[in] | padr | The points of the object to triangulate. The caller owns the pointed array. |
[in] | pcnt | The number of points in the points array padr. |
[out] | vadr | The polygons for the object. Assigned the triangulated polygons. The caller owns the pointed array. Can be assigned nullptr, always check. |
[out] | vcnt | Assigned the triangulated count i.e. the number of polygons in the returned polygons array vadr. |
Bool TriangulateStandard | ( | const Vector * | padr, |
Int32 | pcnt, | ||
Int32 * | list, | ||
Int32 | lcnt, | ||
CPolygon *& | vadr, | ||
Int32 & | vcnt, | ||
BaseThread * | thread | ||
) |
Triangulates the spline described by (padr,pcnt) and (list,lcnt) returning the result in (vadr,vcnt).
[in] | padr | The input points. The caller owns the pointed array. |
[in] | pcnt | The number of input points in padr. |
[in] | list | The input segments. A list with a Int32 for each segment, telling its length within the point array padr. The caller owns the pointed array. |
[in] | lcnt | The number of input segments in list. |
[out] | vadr | Assigned the output polygon array. The caller owns the pointed array. |
[out] | vcnt | The number of polygons in vadr. |
[in] | thread | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
Bool TriangulateRegular | ( | const Vector * | pinp, |
Int32 | pinp_cnt, | ||
Int32 * | list, | ||
Int32 | lcnt, | ||
Vector *& | padr, | ||
Int32 & | pcnt, | ||
CPolygon *& | vadr, | ||
Int32 & | vcnt, | ||
Float | regular_width, | ||
BaseThread * | thread | ||
) |
Triangulates the spline described by (pinp,pinp_cnt) and (list,lcnt) returning the result in (padr,pcnt) and (vadr,vcnt). Generates new points in a regular mesh specified by regular_width.
[in] | pinp | The input points. The caller owns the pointed array. |
[in] | pinp_cnt | The number of input points in pinp. |
[in] | list | The input segments. A list with a Int32 for each segment, telling its length within the point array padr. The caller owns the pointed array. |
[in] | lcnt | The number of input segments in list. |
[out] | padr | Assigned the output point array. The caller owns the pointed array. |
[out] | pcnt | The number of output points in padr. |
[out] | vadr | Assigned the output polygon array. The caller owns the pointed array. |
[out] | vcnt | The number of output polygons in vadr. |
[in] | regular_width | The width of the regular mesh. |
[in] | thread | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
BaseObject* GenerateText | ( | BaseContainer * | cp, |
BaseThread * | bt, | ||
Bool | separate | ||
) |
Creates a text object.
[in] | cp | The container with settings for the text object. |
[in] | bt | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
[in] | separate | true if the letters should be separate, otherwise false. |
Bool CheckDisplayFilter | ( | BaseObject * | op, |
DISPLAYFILTER | filter | ||
) |
Checks if an object is covered by a display filter.
Example:
[in] | op | The object to check. The caller owns the pointed object. |
[in] | filter | The filter bitmask: DISPLAYFILTER |
Bool CheckEditorVisibility | ( | BaseObject * | op | ) |
Checks if an object is visible in the viewport including evaluation of parent hierarchies and layers. Combine with CheckDisplayFilter() to get the visibility in a certain BaseDraw.
[in] | op | The object to check. |
Int32 IntersectionTest | ( | PolygonObject * | op, |
BaseDraw * | bd, | ||
Float | x, | ||
Float | y, | ||
const Matrix & | mg, | ||
Float * | z, | ||
MODELINGCOMMANDMODE | mode, | ||
UChar * | pPointSelect, | ||
Int32 | lSelectCount | ||
) |
Checks for a polygon intersection at position (x/y) in the view bd with object op and global matrix mg.
The resulting Z depth is assigned to z.
[in] | op | The polygon object to check. The caller owns the pointed polygon object. |
[in] | bd | The base draw to check the intersection in. The caller owns the pointed base draw. |
[in] | x | The X coordinate to check. |
[in] | y | The Y coordinate to check. |
[in] | mg | The global matrix of the object. |
[out] | z | Assigned the Z coordinate of the intersection if found. |
[in] | mode | The intersection mode: MODELINGCOMMANDMODE
|
[in] | pPointSelect | An optional point selection. The caller owns the pointed array. |
[in] | lSelectCount | The number of points in pPointselect. |
Vector ComputeLightColor | ( | BaseObject * | op, |
Bool | editor, | ||
Float | reference | ||
) |
Computes the color of a light source. Private.
Computes the color of a light source. Private.
BaseObject* GetVirtualLineObject | ( | BaseObject * | op, |
HierarchyHelp * | hh, | ||
const Matrix & | mloc, | ||
Bool | keep_spline, | ||
Bool | recurse, | ||
Matrix * | mres, | ||
Bool * | dirty | ||
) |
Gets a LineObject or SplineObject from a spline generator.
[in] | op | The spline object. The caller owns the pointed base object. |
[in] | hh | The HierarchyHelp usually passed from ObjectData::GetVirtualObjects(). The caller owns the pointed hierarchy help. |
[in] | mloc | The local matrix of the spline object. |
[in] | keep_spline | true to generate a SplineObject or false for a LineObject. |
[in] | recurse | If true and the object op itself did not generate a line object then Cinema 4D will search through all children and caches of op if any of those objects generates the line form. |
[out] | mres | Assigned the local matrix of the object that created the line form. |
[out] | dirty | Assigned true if the object that generated the spline was modified. In this case the generator knows that it must rebuild its cache. |
UVWTag* GenerateUVW | ( | BaseObject * | op, |
const Matrix & | opmg, | ||
TextureTag * | tp, | ||
const Matrix & | texopmg, | ||
BaseView * | view | ||
) |
Generates a UVW tag for an object.
[in] | op | The object to generate the UVW coordinates for. The caller owns the pointed base object. |
[in] | opmg | The object's global matrix. |
[in] | tp | The texture tag to generate the UVW coordinates from. The caller owns the pointed texture tag. |
[in] | texopmg | The global matrix of the object that carries the texture tag. |
[in] | view | The current view or nullptr. The caller owns the pointed base view. |
void CutReal | ( | BaseContainer & | data, |
Int32 | id, | ||
Float | min, | ||
Float | max | ||
) |
Limits the float value with the specified id in the container data between min and max.
[in] | data | The container with the value. |
[in] | id | The ID of the float value. |
[in] | min | The minimum value. |
[in] | max | The maximum value. |
void CutVector | ( | BaseContainer & | data, |
Int32 | id, | ||
Float | min, | ||
Float | max | ||
) |
Limits the vector value with the specified id in the container data between min and max.
[in] | data | The container with the value. |
[in] | id | The ID of the vector value. |
[in] | min | The minimum value. |
[in] | max | The maximum value. |
Bool CalculateVisiblePoints | ( | BaseDraw * | bd, |
PolygonObject * | op, | ||
Vector * | padr, | ||
UChar * | pset, | ||
Bool | select_visibonly | ||
) |
Checks which points in the points array padr of op are visible in the view bd.
[in] | bd | The base draw to check. The caller owns the pointed base draw. |
[in] | op | The polygon object to check. The caller owns the pointed polygon object. |
[in] | padr | The points array. The caller owns the pointed points array. |
[in] | pset | Assigned an array of size PointObject::GetPointCount() with the visibility status for each point: 1 if the point is visible otherwise 0 . |
[in] | select_visibonly | If true only points that are truly visible are included, otherwise e.g. points from the back of an object are included. |