# xsi_x3dobject.h

Go to the documentation of this file.

    00001 //*****************************************************************************
    00011 //*****************************************************************************
    00012
    00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
    00014 #pragma once
    00015 #endif
    00016
    00017 #ifndef __XSIX3DOBJECT_H__
    00018 #define __XSIX3DOBJECT_H__
    00019
    00020 #include <xsi_sceneitem.h>
    00021 #include <xsi_status.h>
    00022 #include <xsi_math.h>
    00023 #include <xsi_nurbsdata.h>
    00024
    00025 namespace XSI {
    00026
    00027 class Primitive;
    00028 class Kinematics;
    00029 class CameraRig;
    00030 class LightRig;
    00031 class Camera;
    00032 class Light;
    00033 class Null;
    00034 class ChainRoot;
    00035 class StaticKinematicState;
    00036 class ParticleCloud;
    00037 class CMeshBuilder;
    00038 class CRigidBodyAccessor;
    00039 class CRigidConstraintAccessor;
    00040
    00041 //*****************************************************************************
    00089 //*****************************************************************************
    00090 class SICPPSDKDECL X3DObject : public SceneItem
    00091 {
    00092 public:
    00094     X3DObject();
    00095
    00097     ~X3DObject();
    00098
    00102     X3DObject(const CRef& in_ref);
    00103
    00107     X3DObject(const X3DObject& in_obj);
    00108
    00113     bool IsA( siClassID in_ClassID) const;
    00114
    00118     siClassID GetClassID() const;
    00119
    00125     X3DObject& operator=(const X3DObject& in_obj);
    00126
    00132     X3DObject& operator=(const CRef& in_ref);
    00133
    00137     CRefArray GetPrimitives() const;
    00138
    00143     Primitive GetActivePrimitive() const;
    00144
    00148     CRefArray GetChildren() const;
    00149
    00155     CRefArray GetModels( bool in_recursive = true) const;
    00156
    00161     CRefArray GetMaterials() const;
    00162
    00166     Kinematics GetKinematics() const;
    00167
    00175     CStatus AddPrimitive
    00176     (
    00177         const CString& in_preset,
    00178         const CString& in_name ,
    00179         X3DObject& io_3dobj
    00180     );
    00181
    00191     CStatus AddGeometry
    00192     (
    00193         const CString&  in_geompreset,
    00194         const CString&  in_convpreset,
    00195         const CString&  in_name,
    00196         X3DObject&      io_3dobj
    00197     );
    00198
    00279     CStatus AddPolygonMesh( const CString&  in_name,
    00280                             X3DObject&      out_3dobj,
    00281                             CMeshBuilder&   out_meshBuilder );
    00282
    00325     CStatus AddPolygonMesh
    00326     (
    00327         const MATH::CVector3Array&  in_vertices,
    00328         const CLongArray&           in_polygonData,
    00329         const CString&              in_name,
    00330         X3DObject&                  io_3dobj
    00331     );
    00332
    00341     CStatus AddModel
    00342     (
    00343         const CRefArray&    in_objects,
    00344         const CString&      in_name,
    00345         Model&              io_3dobj
    00346     );
    00347
    00357     CStatus AddLattice
    00358     (
    00359         const CString&      in_preset,
    00360         const CRefArray&    in_objects,
    00361         const CString&      in_name,
    00362         X3DObject&          io_3dobj
    00363     );
    00364
    00375     CStatus AddControl
    00376     (
    00377         const CString&      in_preset,
    00378         const CRefArray&    in_objects,
    00379         const CString&      in_name,
    00380         X3DObject&          io_3dobj
    00381     );
    00382
    00391     CStatus AddCameraRig
    00392     (
    00393         const CString&  in_preset,
    00394         const CString&  in_name,
    00395         CameraRig&      io_rig
    00396     );
    00397
    00406     CStatus AddLightRig
    00407     (
    00408         const CString&  in_preset,
    00409         const CString&  in_name,
    00410         LightRig&       io_rig
    00411     );
    00412
    00423     CStatus AddCamera
    00424     (
    00425         const CString&  in_preset,
    00426         const CString&  in_name,
    00427         Camera&         io_camera
    00428     );
    00429
    00441     CStatus AddLight
    00442     (
    00443         const CString& in_preset,
    00444         bool           in_bInterest,
    00445         const CString& in_name,
    00446         Light&         io_light
    00447     );
    00448
    00455     CStatus AddNull
    00456     (
    00457         const CString&  in_name,
    00458         Null&           io_null
    00459     );
    00460
    00467     CStatus AddChild
    00468     (
    00469         const CRefArray& in_objects
    00470     );
    00471
    00478     CStatus RemoveChild
    00479     (
    00480         const CRefArray& in_objects
    00481     );
    00482
    00488     CStatus RemoveFromParent();
    00489
    00501     CStatus Add2DChain
    00502     (
    00503         const MATH::CVector3&   in_rootPos,
    00504         const MATH::CVector3&   in_effPos,
    00505         const MATH::CVector3&   in_normPlane,
    00506         si2DChainAlignType      in_alignType,
    00507         const CString&          in_name,
    00508         ChainRoot&              io_chainroot
    00509     );
    00510
    00521     CStatus Add3DChain
    00522     (
    00523         const MATH::CVector3&   in_rootPos,
    00524         const MATH::CVector3&   in_effPos,
    00525         const MATH::CVector3&   in_normPlane,
    00526         const CString&          in_name,
    00527         ChainRoot&              io_chainroot
    00528     );
    00529
    00533     CRefArray GetShapeAnimatedClusters() const;
    00534
    00629     X3DObject FindChild
    00630     (
    00631         const CString&      in_name,
    00632         const CString&      in_type,
    00633         const CStringArray& in_famArray,
    00634         bool                in_bRecursive = true
    00635     ) const;
    00636
    00750     CRefArray FindChildren
    00751     (
    00752         const CString&      in_name,
    00753         const CString&      in_type,
    00754         const CStringArray& in_famArray,
    00755         bool                in_bRecursive = true
    00756     ) const;
    00757
    00761     bool HasStaticKinematicState() const;
    00762
    00766     StaticKinematicState GetStaticKinematicState() const;
    00767
    00819     bool IsNodeAnimated
    00820     (
    00821         siSourceType    in_sourceType = siAnySource,
    00822         bool            in_bLocal = false
    00823     ) const;
    00824
    00890     CRefArray GetNodeAnimatedParameters
    00891     (
    00892         siSourceType    in_sourceType = siAnySource,
    00893         bool            in_bLocal = false
    00894     ) const;
    00895
    00904     CStatus AddNurbsCurve
    00905     (
    00906         const CNurbsCurveData&      in_curveData,
    00907         siNurbsFormat               in_nurbsFormat,
    00908         const CString&              in_name,
    00909         X3DObject&                  io_3dobj
    00910     );
    00911
    00920     CStatus AddNurbsCurveList
    00921     (
    00922         const CNurbsCurveDataArray& in_curveDataArray,
    00923         siNurbsFormat               in_nurbsFormat,
    00924         const CString&              in_name,
    00925         X3DObject&                  io_3dobj
    00926     );
    00927
    00949     CStatus AddNurbsSurface
    00950     (
    00951         const CNurbsSurfaceData&    in_surfaceData,
    00952         siNurbsFormat               in_nurbsFormat,
    00953         const CString&              in_name,
    00954         X3DObject&                  io_3dobj
    00955     );
    00956
    00965     CStatus AddNurbsSurfaceMesh
    00966     (
    00967         const CNurbsSurfaceDataArray&   in_surfaceDataArray,
    00968         siNurbsFormat                   in_nurbsFormat,
    00969         const CString&                  in_name,
    00970         X3DObject&                      io_3dobj
    00971     );
    00972
    00985     CStatus AddParticleCloud
    00986     (
    00987         const CRefArray&                in_parTypes,
    00988         const CString&                  in_name,
    00989         ParticleCloud&                  out_particlecloud
    00990     );
    00991
    00998     MATH::CVector3 GetLocalScaling()const;
    00999
    01007     CStatus PutLocalScaling(MATH::CVector3 in_scaling);
    01008
    01009
    01016     MATH::CRotation GetLocalRotation()const;
    01017
    01025     CStatus PutLocalRotation(MATH::CRotation in_rotation);
    01026
    01033     MATH::CVector3 GetLocalTranslation()const;
    01034
    01042     CStatus PutLocalTranslation(MATH::CVector3 in_translation);
    01043
    01049     CRigidBodyAccessor GetRigidBodyAccessor( ) const;
    01050
    01056     CRigidConstraintAccessor GetRigidConstraintAccessor( ) const;
    01057
    01058     private:
    01059     X3DObject * operator&() const;
    01060     X3DObject * operator&();
    01061 };
    01062
    01063 };
    01064
    01065 #endif // __XSIX3DOBJECT_H__