xsi_x3dobject.h Source File
 
 
 
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 class Annotation;
00041 
00042 //*****************************************************************************
00090 //*****************************************************************************
00091 class SICPPSDKDECL X3DObject : public SceneItem
00092 {
00093 public:
00095         X3DObject();
00096 
00098         ~X3DObject();
00099 
00103         X3DObject(const CRef& in_ref);
00104 
00108         X3DObject(const X3DObject& in_obj);
00109 
00114         bool IsA( siClassID in_ClassID) const;
00115 
00119         siClassID GetClassID() const;
00120 
00126         X3DObject& operator=(const X3DObject& in_obj);
00127 
00133         X3DObject& operator=(const CRef& in_ref);
00134 
00138         CRefArray GetPrimitives() const;
00139 
00144         Primitive GetActivePrimitive() const;
00145 
00151         Primitive GetActivePrimitive( double in_dFrame ) const;
00152 
00156         CRefArray GetChildren() const;
00157 
00163         CRefArray GetModels( bool in_recursive = true) const;
00164 
00169         CRefArray GetMaterials() const;
00170 
00174         Kinematics GetKinematics() const;
00175 
00183         CStatus AddPrimitive
00184         (
00185                 const CString& in_preset,
00186                 const CString& in_name ,
00187                 X3DObject& io_3dobj
00188         );
00189 
00199         CStatus AddGeometry
00200         (
00201                 const CString&  in_geompreset,
00202                 const CString&  in_convpreset,
00203                 const CString&  in_name,
00204                 X3DObject&              io_3dobj
00205         );
00206 
00287         CStatus AddPolygonMesh( const CString&  in_name,
00288                                                         X3DObject&              out_3dobj,
00289                                                         CMeshBuilder&   out_meshBuilder );
00290 
00333         CStatus AddPolygonMesh
00334         (
00335                 const MATH::CVector3Array&      in_vertices,
00336                 const CLongArray&                       in_polygonData,
00337                 const CString&                          in_name,
00338                 X3DObject&                                      io_3dobj
00339         );
00340 
00349         CStatus AddModel
00350         (
00351                 const CRefArray&        in_objects,
00352                 const CString&          in_name,
00353                 Model&                          io_3dobj
00354         );
00355 
00365         CStatus AddLattice
00366         (
00367                 const CString&          in_preset,
00368                 const CRefArray&        in_objects,
00369                 const CString&          in_name,
00370                 X3DObject&                      io_3dobj
00371         );
00372 
00383         CStatus AddControl
00384         (
00385                 const CString&          in_preset,
00386                 const CRefArray&        in_objects,
00387                 const CString&          in_name,
00388                 X3DObject&                      io_3dobj
00389         );
00390 
00399         CStatus AddCameraRig
00400         (
00401                 const CString&  in_preset,
00402                 const CString&  in_name,
00403                 CameraRig&              io_rig
00404         );
00405 
00414         CStatus AddLightRig
00415         (
00416                 const CString&  in_preset,
00417                 const CString&  in_name,
00418                 LightRig&               io_rig
00419         );
00420 
00431         CStatus AddCamera
00432         (
00433                 const CString&  in_preset,
00434                 const CString&  in_name,
00435                 Camera&                 io_camera
00436         );
00437 
00449         CStatus AddLight
00450         (
00451                 const CString& in_preset,
00452                 bool               in_bInterest,
00453                 const CString& in_name,
00454                 Light&             io_light
00455         );
00456 
00463         CStatus AddNull
00464         (
00465                 const CString&  in_name,
00466                 Null&                   io_null
00467         );
00468 
00475         CStatus AddChild
00476         (
00477                 const CRefArray& in_objects
00478         );
00479 
00486         CStatus RemoveChild
00487         (
00488                 const CRefArray& in_objects
00489         );
00490 
00496         CStatus RemoveFromParent();
00497 
00509         CStatus Add2DChain
00510         (
00511                 const MATH::CVector3&   in_rootPos,
00512                 const MATH::CVector3&   in_effPos,
00513                 const MATH::CVector3&   in_normPlane,
00514                 si2DChainAlignType              in_alignType,
00515                 const CString&                  in_name,
00516                 ChainRoot&                              io_chainroot
00517         );
00518 
00529         CStatus Add3DChain
00530         (
00531                 const MATH::CVector3&   in_rootPos,
00532                 const MATH::CVector3&   in_effPos,
00533                 const MATH::CVector3&   in_normPlane,
00534                 const CString&                  in_name,
00535                 ChainRoot&                              io_chainroot
00536         );
00537 
00541         CRefArray GetShapeAnimatedClusters() const;
00542 
00639         X3DObject FindChild
00640         (
00641                 const CString&          in_name,
00642                 const CString&          in_type,
00643                 const CStringArray& in_famArray,
00644                 bool                            in_bRecursive = true
00645         ) const;
00646 
00736         X3DObject FindChild2
00737         (
00738                 const CString&          in_name,
00739                 const CString&          in_type,
00740                 const CStringArray& in_famArray,
00741                 bool                            in_bRecursive = true
00742         ) const;
00743 
00859         CRefArray FindChildren
00860         (
00861                 const CString&          in_name,
00862                 const CString&          in_type,
00863                 const CStringArray& in_famArray,
00864                 bool                            in_bRecursive = true
00865         ) const;
00866 
00954         CRefArray FindChildren2
00955         (
00956                 const CString&          in_name,
00957                 const CString&          in_type,
00958                 const CStringArray& in_famArray,
00959                 bool                            in_bRecursive = true
00960         ) const;
00961 
00965         bool HasStaticKinematicState() const;
00966 
00970         StaticKinematicState GetStaticKinematicState() const;
00971 
01023         bool IsNodeAnimated
01024         (
01025                 siSourceType    in_sourceType = siAnySource,
01026                 bool                    in_bLocal = false
01027         ) const;
01028 
01094         CRefArray GetNodeAnimatedParameters
01095         (
01096                 siSourceType    in_sourceType = siAnySource,
01097                 bool                    in_bLocal = false
01098         ) const;
01099 
01108         CStatus AddNurbsCurve
01109         (
01110                 const CNurbsCurveData&          in_curveData,
01111                 siNurbsFormat                           in_nurbsFormat,
01112                 const CString&                          in_name,
01113                 X3DObject&                                      io_3dobj
01114         );
01115 
01124         CStatus AddNurbsCurveList
01125         (
01126                 const CNurbsCurveDataArray&     in_curveDataArray,
01127                 siNurbsFormat                           in_nurbsFormat,
01128                 const CString&                          in_name,
01129                 X3DObject&                                      io_3dobj
01130         );
01131 
01153         CStatus AddNurbsSurface
01154         (
01155                 const CNurbsSurfaceData&        in_surfaceData,
01156                 siNurbsFormat                           in_nurbsFormat,
01157                 const CString&                          in_name,
01158                 X3DObject&                                      io_3dobj
01159         );
01160 
01169         CStatus AddNurbsSurfaceMesh
01170         (
01171                 const CNurbsSurfaceDataArray&   in_surfaceDataArray,
01172                 siNurbsFormat                                   in_nurbsFormat,
01173                 const CString&                                  in_name,
01174                 X3DObject&                                              io_3dobj
01175         );
01176 
01189         CStatus AddParticleCloud
01190         (
01191                 const CRefArray&                                in_parTypes,
01192                 const CString&                                  in_name,
01193                 ParticleCloud&                                  out_particlecloud
01194         );
01195 
01202         MATH::CVector3 GetLocalScaling()const;
01203 
01211         CStatus PutLocalScaling(MATH::CVector3 in_scaling);
01212 
01213 
01220         MATH::CRotation GetLocalRotation()const;
01221 
01229         CStatus PutLocalRotation(MATH::CRotation in_rotation);
01230 
01237         MATH::CVector3 GetLocalTranslation()const;
01238 
01246         CStatus PutLocalTranslation(MATH::CVector3 in_translation);
01247 
01253         CRigidBodyAccessor GetRigidBodyAccessor( ) const;
01254 
01260         CRigidConstraintAccessor GetRigidConstraintAccessor( ) const;
01261 
01286         CStatus GetBoundingBox
01287         (
01288            double &                                                     out_minX,
01289            double &                                                     out_minY,
01290            double &                                                     out_minZ,
01291            double &                                                     out_maxX,
01292            double &                                                     out_maxY,
01293            double &                                                     out_maxZ,
01294            const MATH::CTransformation &        in_XfoObjectToBBoxSpace = MATH::CTransformation(),
01295            bool                                                         in_bRecursive = false
01296         ) const;
01297 
01311         Annotation AddAnnotation( const CString& in_text, const CString& in_name = CString() ) ;
01312 
01313         private:
01314         X3DObject * operator&() const;
01315         X3DObject * operator&();
01316 };
01317 
01318 };
01319 
01320 #endif // __XSIX3DOBJECT_H__