1 #ifndef __SCENE_GRAPH_DYNAMICS_CYLINDER_SHAPE_H__
2 #define __SCENE_GRAPH_DYNAMICS_CYLINDER_SHAPE_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://floralicense.org/license/
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
21 #include <dali/internal/update/dynamics/scene-graph-dynamics-shape.h>
24 #include <dali/internal/event/dynamics/dynamics-declarations.h>
25 #include <dali/internal/common/message.h>
26 #include <dali/internal/common/event-to-update.h>
39 class DynamicsCylinderShape : public DynamicsShape
44 * @param[in] world The dynamics world object
46 DynamicsCylinderShape(DynamicsWorld& world);
51 virtual ~DynamicsCylinderShape();
54 * Initialize the cylinder.
55 * @param[in] radius The radius of the cylinder.
56 * @param[in] length The length of the cylinder.
58 void Initialize( float radius, float length );
61 // unimplemented copy constructor and assignment operator
62 DynamicsCylinderShape(const DynamicsCylinderShape&);
63 DynamicsCylinderShape& operator=(const DynamicsCylinderShape&);
65 }; // class DynamicsCylinderShape
67 // Messages for DynamicsCylinderShape
69 inline void InitializeDynamicsCylinderShapeMessage( EventToUpdate& eventToUpdate, const DynamicsCylinderShape& shape, const float radius, const float length )
71 typedef MessageValue2< DynamicsCylinderShape, float, float > LocalType;
73 // Reserve some memory inside the message queue
74 unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
76 // Construct message in the message queue memory; note that delete should not be called on the return value
77 new (slot) LocalType( &shape, &DynamicsCylinderShape::Initialize, radius, length );
80 } // namespace SceneGraph
82 } // namespace Internal
86 #endif // __SCENE_GRAPH_DYNAMICS_CYLINDER_SHAPE_H__