00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #pragma once
00018
00019 #include "object.h"
00020
00021 extern CoreExport Class_ID linearShapeClassID;
00022
00023 #pragma warning(push)
00024 #pragma warning(disable:4239)
00025
00036 class LinearShape : public ShapeObject {
00037 private:
00038 Interval geomValid;
00039 Interval topoValid;
00040 Interval selectValid;
00041 ChannelMask validBits;
00042 void CopyValidity(LinearShape *fromOb, ChannelMask channels);
00043
00044 protected:
00045
00046 RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message );
00047
00048 public:
00049 PolyShape shape;
00050
00052 CoreExport LinearShape();
00054 CoreExport ~LinearShape();
00055
00056 CoreExport LinearShape &operator=(LinearShape &from);
00057
00058
00059
00060
00061 CoreExport int HitTest(TimeValue t, INode* inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt);
00062 CoreExport void Snap(TimeValue t, INode* inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt);
00063 CoreExport int Display(TimeValue t, INode* inode, ViewExp *vpt, int flags);
00064 CoreExport CreateMouseCallBack* GetCreateMouseCallBack();
00065 CoreExport RefTargetHandle Clone(RemapDir& remap);
00066
00067 CoreExport ObjectState Eval(TimeValue time);
00068 CoreExport Interval ObjectValidity(TimeValue t);
00069
00070
00071 CoreExport Interval ConvertValidity(TimeValue t);
00072
00073
00074 CoreExport Interval ChannelValidity(TimeValue t, int nchan);
00075 CoreExport void SetChannelValidity(int i, Interval v);
00076 CoreExport void InvalidateChannels(ChannelMask channels);
00077
00078
00079 int IsDeformable() { return 1; }
00080 CoreExport int NumPoints();
00081 CoreExport Point3 GetPoint(int i);
00082 CoreExport void SetPoint(int i, const Point3& p);
00083 CoreExport BOOL IsPointSelected (int i);
00084
00085 CoreExport void PointsWereChanged();
00086 CoreExport void GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm=NULL,BOOL useSel=FALSE );
00087 CoreExport void Deform(Deformer *defProc, int useSel);
00088
00089 CoreExport int CanConvertToType(Class_ID obtype);
00090 CoreExport Object* ConvertToType(TimeValue t, Class_ID obtype);
00091 CoreExport void FreeChannels(ChannelMask chan);
00092 CoreExport Object *MakeShallowCopy(ChannelMask channels);
00093 CoreExport void ShallowCopy(Object* fromOb, ChannelMask channels);
00094 CoreExport void NewAndCopyChannels(ChannelMask channels);
00095
00096 CoreExport DWORD GetSubselState();
00097
00098
00099 CoreExport ObjectHandle CreateTriObjRep(TimeValue t);
00100 CoreExport void GetWorldBoundBox(TimeValue t, INode *inode, ViewExp* vpt, Box3& box );
00101 CoreExport void GetLocalBoundBox(TimeValue t, INode *inode, ViewExp* vpt, Box3& box );
00102 CoreExport int NumberOfVertices(TimeValue t, int curve);
00103 CoreExport int NumberOfCurves();
00104 CoreExport BOOL CurveClosed(TimeValue t, int curve);
00105 CoreExport Point3 InterpCurve3D(TimeValue t, int curve, float param, int ptype=PARAM_SIMPLE);
00106 CoreExport Point3 TangentCurve3D(TimeValue t, int curve, float param, int ptype=PARAM_SIMPLE);
00107 CoreExport float LengthOfCurve(TimeValue t, int curve);
00108 CoreExport int NumberOfPieces(TimeValue t, int curve);
00109 CoreExport Point3 InterpPiece3D(TimeValue t, int curve, int piece, float param, int ptype=PARAM_SIMPLE);
00110 CoreExport Point3 TangentPiece3D(TimeValue t, int curve, int piece, float param, int ptype=PARAM_SIMPLE);
00126 CoreExport MtlID GetMatID(TimeValue t, int curve, int piece);
00127 BOOL CanMakeBezier() { return TRUE; }
00128 CoreExport void MakeBezier(TimeValue t, BezierShape &shape);
00129 CoreExport ShapeHierarchy &OrganizeCurves(TimeValue t, ShapeHierarchy *hier = NULL);
00130 CoreExport void MakePolyShape(TimeValue t, PolyShape &shape, int steps = PSHAPE_BUILTIN_STEPS, BOOL optimize = FALSE);
00131 CoreExport int MakeCap(TimeValue t, MeshCapInfo &capInfo, int capType);
00132 CoreExport int MakeCap(TimeValue t, PatchCapInfo &capInfo);
00133
00135 PolyShape& GetShape() { return shape; }
00136
00137
00138
00139
00144 CoreExport void SetPointFlags();
00145
00146
00147
00148 CoreExport void DeleteThis();
00149 void FreeCaches() { shape.InvalidateGeomCache(FALSE); }
00150 Class_ID ClassID() { return linearShapeClassID; }
00151 CoreExport void GetClassName(MSTR& s);
00152 void NotifyMe(Animatable* subAnim, int message) { UNUSED_PARAM(subAnim); UNUSED_PARAM(message);}
00153 int IsKeyable() { return 0;}
00154 int Update(TimeValue t) { UNUSED_PARAM(t); return 0; }
00155 BOOL BypassTreeView() { return TRUE; }
00156
00157 CoreExport MCHAR *GetObjectName();
00158
00159
00160 CoreExport IOResult Save(ISave *isave);
00161 CoreExport IOResult Load(ILoad *iload);
00162
00163
00164 CoreExport void RescaleWorldUnits(float f);
00165
00166
00167 CoreExport void InvalidateGeomCache();
00168 };
00169
00170 #pragma warning(pop)
00171
00172 CoreExport ClassDesc* GetLinearShapeDescriptor();
00173