1 //-----------------------------------------------------------------------------
2 // Copyright (c) 2012 GarageGames, LLC
4 // Permission is hereby granted, free of charge, to any person obtaining a copy
5 // of this software and associated documentation files (the "Software"), to
6 // deal in the Software without restriction, including without limitation the
7 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 // sell copies of the Software, and to permit persons to whom the Software is
9 // furnished to do so, subject to the following conditions:
11 // The above copyright notice and this permission notice shall be included in
12 // all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 //-----------------------------------------------------------------------------
26 #ifndef _SCENEOBJECT_H_
27 #include "scene/sceneObject.h"
29 #ifndef _GFXSTATEBLOCK_H_
30 #include "gfx/gfxStateBlock.h"
32 #ifndef _GFXVERTEXBUFFER_H_
33 #include "gfx/gfxVertexBuffer.h"
35 #ifndef _GFXPRIMITIVEBUFFER_H_
36 #include "gfx/gfxPrimitiveBuffer.h"
39 class BaseMatInstance
;
45 //--------------------------------------------------------------------------
47 class Path
: public SimGroup
49 typedef SimGroup Parent
;
54 NoPathIndex
= 0xFFFFFFFF
70 void addObject(SimObject
*);
71 void removeObject(SimObject
*);
75 bool isLooping() { return mIsLooping
; }
76 U32
getPathIndex() const;
78 DECLARE_CONOBJECT(Path
);
79 static void initPersistFields();
82 //--------------------------------------------------------------------------
83 //--------------------------------------------------------------------------
84 inline U32
Path::getPathIndex() const
92 //--------------------------------------------------------------------------
93 class Marker
: public SceneObject
95 typedef SceneObject Parent
;
103 SmoothingTypeAccelerate
,
109 KnotTypePositionOnly
,
122 void prepRenderImage(SceneRenderState
*state
);
123 void renderObject(ObjectRenderInst
*ri
, SceneRenderState
*state
, BaseMatInstance
* overrideMat
);
130 void onEditorEnable();
131 void onEditorDisable();
133 static void initGFXResources();
135 static GFXStateBlockRef smStateBlock
;
136 static GFXVertexBufferHandle
<GFXVertexPCT
> smVertexBuffer
;
137 static GFXPrimitiveBufferHandle smPrimitiveBuffer
;
143 DECLARE_CONOBJECT(Marker
);
144 static void initPersistFields();
145 void inspectPostApply();
147 U32
packUpdate (NetConnection
*conn
, U32 mask
, BitStream
*stream
);
148 void unpackUpdate(NetConnection
*conn
, BitStream
*stream
);
151 typedef Marker::SmoothingType MarkerSmoothingType
;
152 typedef Marker::KnotType MarkerKnotType
;
154 DefineEnumType( MarkerSmoothingType
);
155 DefineEnumType( MarkerKnotType
);