1 #ifndef __SCENE_GRAPH_DYNAMICS_SHAPE_H__
2 #define __SCENE_GRAPH_DYNAMICS_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.
25 #include <dali/internal/common/message.h>
26 #include <dali/internal/event/common/event-thread-services.h>
27 #include <dali/internal/event/dynamics/dynamics-declarations.h>
37 } // namespace Integration
53 DynamicsShape(DynamicsWorld& world);
58 virtual ~DynamicsShape();
61 * Initialize shape, and add it to the world's shape container
66 * Remove from world's shape container
70 Integration::DynamicsShape* GetShape() const;
73 // unimplemented copy constructor and assignment operator
74 DynamicsShape(const DynamicsShape&);
75 DynamicsShape& operator=(const DynamicsShape&);
78 Integration::DynamicsShape* mShape;
79 DynamicsWorld& mWorld;
81 }; // class DynamicsCubeShape
83 inline void DeleteShapeMessage( EventThreadServices& eventThreadServices, const DynamicsShape& shape )
85 typedef Message< DynamicsShape > LocalType;
87 // Reserve some memory inside the message queue
88 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
90 // Construct message in the message queue memory; note that delete should not be called on the return value
91 new (slot) LocalType( &shape, &DynamicsShape::Delete );
94 } // namespace SceneGraph
96 } // namespace Internal
100 #endif // __SCENE_GRAPH_DYNAMICS_SHAPE_H__