1 #ifndef __SCENE_GRAPH_DYNAMICS_CONE_SHAPE_H__
2 #define __SCENE_GRAPH_DYNAMICS_CONE_SHAPE_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/internal/update/dynamics/scene-graph-dynamics-shape.h>
25 #include <dali/internal/event/dynamics/dynamics-declarations.h>
26 #include <dali/internal/common/message.h>
27 #include <dali/internal/common/event-to-update.h>
40 class DynamicsConeShape : public DynamicsShape
45 * @param[in] world The dynamics world object
47 DynamicsConeShape(DynamicsWorld& world);
52 virtual ~DynamicsConeShape();
56 * @param[in] radius The radius of the cone.
57 * @param[in] length The length of the cone.
59 void Initialize( float radius, float length );
62 // unimplemented copy constructor and assignment operator
63 DynamicsConeShape(const DynamicsConeShape&);
64 DynamicsConeShape& operator=(const DynamicsConeShape&);
66 }; // class DynamicsConeShape
68 // Messages for DynamicsConeShape
70 inline void InitializeDynamicsConeShapeMessage( EventToUpdate& eventToUpdate, const DynamicsConeShape& shape, const float radius, const float length )
72 typedef MessageValue2< DynamicsConeShape, float, float > LocalType;
74 // Reserve some memory inside the message queue
75 unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
77 // Construct message in the message queue memory; note that delete should not be called on the return value
78 new (slot) LocalType( &shape, &DynamicsConeShape::Initialize, radius, length );
81 } // namespace SceneGraph
83 } // namespace Internal
87 #endif // __SCENE_GRAPH_DYNAMICS_CONE_SHAPE_H__