X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Frendering%2Fgeometry-impl.h;h=8a1f90aa53d90a13b4bbc477738d59e53497ce2e;hb=800a97fbc97bfe7e64994c318d56ef8e097c7504;hp=ae3acf1ae8b0918f5d5d83fd2b185fe2d062ad3b;hpb=1dfce36dd2279a454bf2681e4562c8ee0cf54fb5;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/rendering/geometry-impl.h b/dali/internal/event/rendering/geometry-impl.h index ae3acf1..8a1f90a 100644 --- a/dali/internal/event/rendering/geometry-impl.h +++ b/dali/internal/event/rendering/geometry-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_GEOMETRY_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,12 @@ // INTERNAL INCLUDES #include // DALI_ASSERT_ALWAYS #include // Dali::IntrusivePtr -#include // Dali::Geometry +#include // Dali::Geometry #include // Dali::Internal::Connectable #include // Dali::Internal::ObjectConnector #include // Dali::Internal::Object #include // Dali::Internal::PropertyBuffer +#include namespace Dali { @@ -46,7 +47,7 @@ typedef IntrusivePtr GeometryPtr; * Geometry is an object that contains an array of structures of values that * can be accessed as properties. */ -class Geometry : public Object, public Connectable +class Geometry : public BaseObject { public: @@ -74,129 +75,30 @@ public: /** * @copydoc Dali::Geometry::SetIndexBuffer() */ - void SetIndexBuffer( PropertyBuffer& indexBuffer ); + void SetIndexBuffer( const unsigned short* indices, size_t count ); /** - * @copydoc Dali::Geometry::SetGeometryType() + * @copydoc Dali::Geometry::SetType() */ - void SetGeometryType( Dali::Geometry::GeometryType geometryType ); + void SetType( Dali::Geometry::Type geometryType ); /** - * @copydoc Dali::Geometry::GetGeometryType() + * @copydoc Dali::Geometry::GetType() */ - Dali::Geometry::GeometryType GetGeometryType() const; - - /** - * @copydoc Dali::Geometry::SetRequiresDepthTesting() - */ - void SetRequiresDepthTesting( bool requiresDepthTest ); - - /** - * @copydoc Dali::Geometry::GetRequiresDepthTesting() - */ - bool GetRequiresDepthTesting() const; + Dali::Geometry::Type GetType() const; /** * @brief Get the geometry scene object * * @return the geometry scene object */ - const SceneGraph::Geometry* GetGeometrySceneObject() const; - -public: // Default property extensions from Object - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() - */ - virtual unsigned int GetDefaultPropertyCount() const; - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() - */ - virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyName() - */ - virtual const char* GetDefaultPropertyName(Property::Index index) const; + const Render::Geometry* GetRenderObject() const; - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() - */ - virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; - - /** - * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() - */ - virtual bool IsDefaultPropertyWritable(Property::Index index) const; - - /** - * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() - */ - virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; - - /** - * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() - */ - virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyType() - */ - virtual Property::Type GetDefaultPropertyType(Property::Index index) const; - - /** - * @copydoc Dali::Internal::Object::SetDefaultProperty() - */ - virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); - - /** - * @copydoc Dali::Internal::Object::SetSceneGraphProperty() - */ - virtual void SetSceneGraphProperty( Property::Index index, const PropertyMetadata& entry, const Property::Value& value ); - - /** - * @copydoc Dali::Internal::Object::GetDefaultProperty() - */ - virtual Property::Value GetDefaultProperty( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::GetPropertyOwner() - */ - virtual const SceneGraph::PropertyOwner* GetPropertyOwner() const; - - /** - * @copydoc Dali::Internal::Object::GetSceneObject() - */ - virtual const SceneGraph::PropertyOwner* GetSceneObject() const; - - /** - * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() - */ - virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() - */ - virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; - -public: // Functions from Connectable - /** - * @copydoc Dali::Internal::Connectable::OnStage() - */ - virtual bool OnStage() const; - - /** - * @copydoc Dali::Internal::Connectable::Connect() - */ - virtual void Connect(); +private: // implementation /** - * @copydoc Dali::Internal::Connectable::Disconnect() + * Constructor */ - virtual void Disconnect(); - -private: // implementation Geometry(); /** @@ -205,6 +107,7 @@ private: // implementation void Initialize(); protected: + /** * A reference counted object may only be deleted by calling Unreference() */ @@ -216,15 +119,11 @@ private: // unimplemented methods private: // data - SceneGraph::Geometry* mSceneObject; + EventThreadServices& mEventThreadServices; /// mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers - PropertyBufferPtr mIndexBuffer; ///< Intrusive pointer to index buffer - - Dali::Geometry::GeometryType mGeometryType; ///< Geometry type (cached) - bool mRequiresDepthTest; ///< Establish if geometry requires depth testing (cached) - - bool mOnStage; + Dali::Geometry::Type mType; ///< Geometry type (cached) }; } // namespace Internal