SplineObject Class Reference

#include <c4d_splineobject.h>

Inheritance diagram for SplineObject:

Public Types

typedef PointObject SUPER
 
- Public Types inherited from PointObject
typedef BaseObject SUPER
 
- Public Types inherited from BaseObject
typedef BaseList4D SUPER
 
- Public Types inherited from BaseList4D
typedef BaseList2D SUPER
 
- Public Types inherited from BaseList2D
typedef GeListNode SUPER
 
- Public Types inherited from GeListNode
typedef PrivateChunk SUPER
 

Public Member Functions

virtual Bool IsInstanceOf (cineware::Int32 id) const
 
- Public Member Functions inherited from PointObject
BaseSelectGetPointS ()
 
BaseSelectGetPointH ()
 
const VectorGetPointR ()
 
VectorGetPointW ()
 
Int32 GetPointCount ()
 
Bool ResizeObject (Int32 pcnt)
 
- Public Member Functions inherited from BaseObject
BaseObjectGetNext ()
 
BaseObjectGetPred ()
 
BaseObjectGetUp ()
 
BaseObjectGetDown ()
 
BaseObjectGetDownLast ()
 
virtual BaseList2DGetClone (COPYFLAGS flags, AliasTrans *trans)
 
Vector GetAbsPos () const
 
void SetAbsPos (const Vector &v)
 
Vector GetAbsScale () const
 
void SetAbsScale (const Vector &v)
 
Vector GetAbsRot () const
 
void SetAbsRot (const Vector &v)
 
Vector GetFrozenPos () const
 
void SetFrozenPos (const Vector &v)
 
Vector GetFrozenScale () const
 
void SetFrozenScale (const Vector &v)
 
Vector GetFrozenRot () const
 
void SetFrozenRot (const Vector &v)
 
Vector GetRelPos () const
 
void SetRelPos (const Vector &v)
 
Vector GetRelScale () const
 
void SetRelScale (const Vector &v)
 
Vector GetRelRot () const
 
void SetRelRot (const Vector &v)
 
const MatrixGetMl () const
 
void SetMl (const Matrix &m)
 
Matrix GetFrozenMln () const
 
Matrix GetRelMln () const
 
Matrix GetRelMl () const
 
void SetRelMl (const Matrix &m)
 
Matrix GetMg ()
 
void SetMg (const Matrix &m)
 
Matrix GetMln () const
 
Matrix GetMgn ()
 
Matrix GetUpMg ()
 
void CopyMatrixTo (BaseObject *dest)
 
void SetRotationOrder (ROTATIONORDER order)
 
ROTATIONORDER GetRotationOrder () const
 
void SetQuaternionRotationMode (Bool active)
 
Bool IsQuaternionRotationMode ()
 
Bool SynchronizeVectorTrackKeys (Int32 vectorTrackID, BaseTime startRange=BaseTime(-108000, 1), BaseTime endRange=BaseTime(108000, 1))
 
Bool FindBestEulerAngle (Int32 rotationTrackID, Bool bAdjustTangent, BaseTime startRange=BaseTime(-108000, 1), BaseTime endRange=BaseTime(108000, 1))
 
Int32 GetEditorMode ()
 
void SetEditorMode (Int32 mode)
 
Int32 GetRenderMode ()
 
void SetRenderMode (Int32 mode)
 
Bool GetDeformMode ()
 
void SetDeformMode (Bool mode)
 
BaseTagGetFirstTag ()
 
BaseTagGetTag (Int32 type, Int32 nr=0)
 
BaseTagMakeTag (Int32 type, BaseTag *pred=nullptr)
 
void InsertTag (BaseTag *tp, BaseTag *pred=nullptr)
 
void KillTag (Int32 type, Int32 nr=0)
 
BaseObjectGetCache ()
 
BaseObjectGetDeformCache ()
 
void GetColorProperties (ObjectColorProperties *prop)
 
void SetColorProperties (ObjectColorProperties *prop)
 
Bool HasChanged ()
 
- Public Member Functions inherited from BaseList4D
BaseList4DGetUp ()
 
BaseList4DGetDown ()
 
BaseList4DGetDownLast ()
 
void InsertBefore (BaseList4D *bl)
 
void InsertAfter (BaseList4D *bl)
 
void InsertUnder (BaseList4D *bl)
 
void InsertUnderLast (BaseList4D *bl)
 
virtual void Remove ()
 
- Public Member Functions inherited from BaseList2D
 BaseList2D ()
 
virtual ~BaseList2D ()
 
BaseList2DGetNext ()
 
BaseList2DGetPred ()
 
NodeDataGetNodeData ()
 
void SetNodeData (NodeData *data)
 
void SetBit (Int32 mask)
 
Bool GetBit (Int32 mask)
 
void DelBit (Int32 mask)
 
void ToggleBit (Int32 mask)
 
Int32 GetAllBits ()
 
void SetAllBits (Int32 bits)
 
BaseContainer GetData ()
 
BaseContainerGetDataInstance ()
 
BaseContainerGetDataInstanceRef ()
 
const StringGetName ()
 
void SetName (const String &new_name)
 
const GeMarkerGetMarker () const
 
void SetMarker (const GeMarker &m)
 
Bool AddUniqueID (Int32 appid, const Char *const mem, Int bytes)
 
Bool FindUniqueID (Int32 appid, const Char *&mem, Int &bytes) const
 
Int32 GetUniqueIDCount () const
 
Bool GetUniqueIDIndex (Int32 idx, Int32 &id, const Char *&mem, Int &bytes) const
 
BaseShaderGetFirstShader ()
 
Bool InsertShader (BaseShader *shader, BaseShader *pred=nullptr)
 
Bool InsertShaderLast (BaseShader *shader)
 
RootCTrackGetCTrackRoot ()
 
CTrackGetFirstCTrack ()
 
CTrackFindCTrack (const DescID &id)
 
Bool AppendCTrack (CTrack *t)
 
void InsertTrackSorted (CTrack *track)
 
LayerObjectGetLayerObject ()
 
void SetLayerObject (LayerObject *layer)
 
const LayerDataGetLayerData (BaseDocument *doc, Bool rawdata=false)
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 
DynamicDescriptionGetDynamicDescription ()
 
virtual Bool IsBaseList ()
 
Bool SetDescIDState (const DescID &id, DESCIDSTATE descidstate)
 
DESCIDSTATE GetDescIDState (const DescID &id, Bool tolerant) const
 
RootPluginNodeGetOverrideRoot ()
 
BaseOverrideGetFirstOverride ()
 
virtual Bool TranslateDescID (const DescID &id, DescID &res_id, GeListNode *&res_at)
 
- Public Member Functions inherited from GeListNode
 GeListNode ()
 
 ~GeListNode ()
 
virtual Bool GetNBit (Int32 bit) const
 
virtual Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 
BaseDocumentGetDocument ()
 
virtual Int32 GetInfo ()
 
GeListNodeGetPred ()
 
GeListNodeGetNext ()
 
GeListNodeGetUp ()
 
GeListNodeGetDown ()
 
GeListNodeGetDownLast ()
 
void InsertBefore (GeListNode *op)
 
void InsertAfter (GeListNode *op)
 
void Remove ()
 
void InsertUnder (GeListNode *op)
 
void InsertUnderLast (GeListNode *op)
 
RootList2DGetListHead ()
 
Int32 GetNodeID (Int32 index=0) const
 
- Public Member Functions inherited from PrivateChunk
 PrivateChunk ()
 
Bool ReadChunk (HyperFile *hf, Bool keepin=false, Bool noheader=false)
 
virtual Bool IsListHead ()
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf, Int32 type)
 
Bool CopyTo (PrivateChunk *dest, COPYFLAGS flags, AliasTrans *trans)
 
Bool GetParameter (Int32 id, GeData &data)
 
Bool SetParameter (Int32 id, const GeData &data)
 
Bool GetParameter (const DescID &id, GeData &data)
 
Bool SetParameter (const DescID &id, const GeData &data)
 
virtual Int32 GetChunkLevel ()
 
- Public Member Functions inherited from GeTempPublicNode2D< PrivateChunk >
PrivateChunkGetNext () const
 
PrivateChunkGetPrev () const
 
void InsertBefore (PrivateChunk *n)
 
void InsertAfter (PrivateChunk *n)
 
void Remove ()
 

Protected Member Functions

 SplineObject ()
 
- Protected Member Functions inherited from PointObject
 PointObject ()
 
- Protected Member Functions inherited from BaseObject
virtual Int32 GetInstanceType () const
 
 BaseObject ()
 
 BaseObject (Int32 id)
 
virtual ~BaseObject ()
 
- Protected Member Functions inherited from BaseList4D
 BaseList4D ()
 
 ~BaseList4D ()
 
- Protected Member Functions inherited from BaseList2D
void SetID (Int32 id)
 

Private Member Functions

virtual Int32 GetDiskType () const
 
virtual Bool HandleSubChunk (HyperFile *hf, Int32 id, Int32 level)
 
virtual Bool Write (HyperFile *hf)
 

Friends

class BaseObject
 

Alloc/Free

static SplineObjectAlloc (Int32 pcnt, SPLINETYPE type)
 
static void Free (SplineObject *&bl)
 

Type

virtual Int32 GetType () const
 

Interpolation Type

Int32 GetInterpolationType ()
 
void SetInterpolationType (Int32 i)
 

Spline Type

SPLINETYPE GetSplineType ()
 
void SetSplineType (SPLINETYPE t)
 

Closed

Bool GetIsClosed ()
 
void SetIsClosed (Bool b)
 

Resize

Bool ResizeObject (Int32 pcnt, Int32 scnt)
 

Segment

const SegmentGetSegmentR ()
 
SegmentGetSegmentW ()
 
Int32 GetSegmentCount ()
 

Tangent

const TangentGetTangentR ()
 
TangentGetTangentW ()
 
Int32 GetTangentCount ()
 

Execute

virtual Bool Execute ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseObject
static BaseObjectAlloc (Int32 type)
 
static void Free (BaseObject *&bl)
 
- Protected Attributes inherited from BaseList2D
Int32 m_id
 
RootShader mp_rootshader
 
RootShader mp_rootshader_hidden
 
RootShader root_shader_repository
 
Int32 l_bitfeld
 
RootCTrack mp_rootctrack
 
RootPluginNode root_override
 
NotifyListnotify_events
 
DescIdStorekeyframestore
 
DescIdStorepropstore
 
BaseContainer m_bc
 
NodeDatam_data
 
- Protected Attributes inherited from GeListNode
GeAliasGoal m_xgoal
 
UInt32 m_bits [4]
 
RootList2Dt_rootlist_parent
 
RootList2Dm_children
 
BaseDocumentparent_doc
 
void * unknownData
 
Int unknownDataSize
 
Int32 unknownDataLevel
 
Int32 pluginID
 

Detailed Description

Represents Cinema 4D's spline object.

Note
Has to be created with Alloc() and destroyed with Free().

Member Typedef Documentation

◆ SUPER

typedef PointObject SUPER

Constructor & Destructor Documentation

◆ SplineObject()

SplineObject ( )
protected

Member Function Documentation

◆ IsInstanceOf()

virtual Bool IsInstanceOf ( cineware::Int32  id) const
virtual

Reimplemented from PointObject.

◆ GetDiskType()

virtual Int32 GetDiskType ( ) const
privatevirtual

Gets the unique disk type of the base list.

Note
Normally this is the same as GetType() but there are exceptions.
Returns
The disk type, for example Ocube.

Reimplemented from PointObject.

◆ HandleSubChunk()

virtual Bool HandleSubChunk ( HyperFile hf,
Int32  id,
Int32  level 
)
privatevirtual

Private.

Reimplemented from BaseObject.

◆ Write()

virtual Bool Write ( HyperFile hf)
privatevirtual

Private.

Reimplemented from BaseObject.

◆ Alloc()

static SplineObject* Alloc ( Int32  pcnt,
SPLINETYPE  type 
)
static

Allocates a spline object. Destroy the allocated spline object with Free().

Parameters
[in]pcntThe point count.
[in]typeThe spline type.
Returns
The allocated spline object, or nullptr if the allocation failed.

◆ Free()

static void Free ( SplineObject *&  bl)
static

Destructs spline objects allocated with Alloc().

Parameters
[in,out]blThe spline object to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ GetType()

virtual Int32 GetType ( ) const
virtual

Gets the object type for a SplineObject.

Note
Always returns Ospline.
Returns
The object type for a SplineObject i.e. Ospline.

Reimplemented from PointObject.

◆ GetInterpolationType()

Int32 GetInterpolationType ( )

Gets the spline interpolation type.

Returns
The spline interpolation type: SPLINEOBJECT_INTERPOLATION.

◆ SetInterpolationType()

void SetInterpolationType ( Int32  i)

Sets the spline interpolation type.

Parameters
[in]iThe spline interpolation type to set: SPLINEOBJECT_INTERPOLATION.

◆ GetSplineType()

SPLINETYPE GetSplineType ( )

Gets the spline type.

Returns
The spline type.

◆ SetSplineType()

void SetSplineType ( SPLINETYPE  t)

Sets the spline type.

Parameters
[in]tThe spline type to set.

◆ GetIsClosed()

Bool GetIsClosed ( )

Checks if the spline is closed.

Returns
true if the spline is closed, otherwise false.

◆ SetIsClosed()

void SetIsClosed ( Bool  b)

Sets if a spline is closed.

Parameters
[in]btrue for closed splines, false for open splines.

◆ ResizeObject()

Bool ResizeObject ( Int32  pcnt,
Int32  scnt 
)

Changes the number of segments and points.

Parameters
[in]pcntThe new point count.
[in]scntThe new segment count.
Returns
true if successful, otherwise false.

◆ GetSegmentR()

const Segment* GetSegmentR ( )

Gets a pointer to the read-only segments buffer.

Returns
A pointer to the read-only segments buffer. The spline object owns the pointed buffer.

◆ GetSegmentW()

Segment* GetSegmentW ( )

Gets a pointer to the writable segments buffer.

Returns
A pointer to the writable segments buffer. The spline object owns the pointed buffer.

◆ GetSegmentCount()

Int32 GetSegmentCount ( )

Gets the number of segments.

Returns
The number of segments.

◆ GetTangentR()

const Tangent* GetTangentR ( )

Gets a pointer to the read-only tangents buffer.

Returns
A pointer to the read-only tangents buffer. The spline object owns the pointed buffer.

◆ GetTangentW()

Tangent* GetTangentW ( )

Gets a pointer to the writable tangents buffer.

Returns
A pointer to the writable tangents buffer. The spline object owns the pointed buffer.

◆ GetTangentCount()

Int32 GetTangentCount ( )

Gets the number of tangents.

Returns
The number of tangents.

◆ Execute()

virtual Bool Execute ( )
virtual

Overload this for self defined spline objects.

Returns
true if the spline object type is supported by the external application, otherwise false.

Reimplemented from BaseObject.

Friends And Related Function Documentation

◆ BaseObject

friend class BaseObject
friend