neoGFX
C++ GPU-oriented GUI library and app/game creation framework.
neogfx::shape Class Reference

#include <shape.hpp>

Inheritance diagram for neogfx::shape:
neogfx::i_shape neogfx::i_game_object neogfx::i_mesh neogfx::rectangle neogfx::sprite neogfx::text

Classes

struct  animation_info
 

Public Types

typedef i_shape::frame_index frame_index
 
typedef i_shape::time_interval time_interval
 
typedef i_shape::animation_frame animation_frame
 
typedef i_shape::animation_frames animation_frames
 
typedef i_shape::time_interval time_interval
 
typedef i_shape::optional_time_interval optional_time_interval
 
typedef boost::optional< animation_infooptional_animation_info
 
- Public Types inherited from neogfx::i_shape
typedef std::size_t frame_index
 
typedef scalar time_interval
 
typedef std::pair< frame_index, time_intervalanimation_frame
 
typedef std::vector< animation_frameanimation_frames
 
typedef boost::optional< time_intervaloptional_time_interval
 

Public Member Functions

 shape ()
 
 shape (const colour &aColour)
 
 shape (const i_texture &aTexture, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const i_image &aImage, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const i_texture &aTexture, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const i_image &aImage, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer)
 
 shape (i_shape_container &aContainer, const colour &aColour)
 
 shape (i_shape_container &aContainer, const i_texture &aTexture, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer, const i_image &aImage, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer, const i_texture &aTexture, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (i_shape_container &aContainer, const i_image &aImage, const rect &aTextureRect, const optional_animation_info &aAnimationInfo=optional_animation_info())
 
 shape (const shape &aOther)
 
object_category category () const override
 
const i_shapeas_shape () const override
 
i_shapeas_shape () override
 
const i_collidable_objectas_collidable_object () const override
 
i_collidable_objectas_collidable_object () override
 
const i_physical_objectas_physical_object () const override
 
i_physical_objectas_physical_object () override
 
bool killed () const override
 
void kill () override
 
vertex_list_pointer vertices () const override
 
texture_list_pointer textures () const override
 
face_list faces () const override
 
face_list active_faces () const override
 
void activate_faces (face_list aActiveFaces) const override
 
mat44 transformation_matrix () const override
 
const vertex_listtransformed_vertices () const override
 
void set_vertices (vertex_list_pointer aVertices) override
 
void set_textures (texture_list_pointer aTextures) override
 
void set_faces (face_list aFaces) override
 
const i_shape_containercontainer () const override
 
i_shape_containercontainer () override
 
bool is_tag () const override
 
i_shapetag_of () const override
 
void set_tag_of (i_shape &aTagOf, const vec3 &aOffset=vec3{}) override
 
const vec3tag_offset () const override
 
void set_tag_offset (const vec3 &aOffset) override
 
void unset_tag_of () override
 
frame_index frame_count () const override
 
const i_shape_frameshape_frame (frame_index aFrameIndex) const override
 
i_shape_frameshape_frame (frame_index aFrameIndex) override
 
void add_frame (i_shape_frame &aFrame) override
 
void add_frame (std::shared_ptr< i_shape_frame > aFrame) override
 
void replace_frame (frame_index aFrameIndex, i_shape_frame &aFrame) override
 
void replace_frame (frame_index aFrameIndex, std::shared_ptr< i_shape_frame > aFrame) override
 
void remove_frame (frame_index aFrameIndex) override
 
const animation_framesanimation () const override
 
bool repeat_animation () const override
 
const animation_framecurrent_animation_frame () const override
 
bool has_animation_finished () const override
 
void animation_finished () override
 
frame_index current_frame_index () const override
 
const i_shape_framecurrent_frame () const override
 
i_shape_framecurrent_frame ()
 
vec3 origin () const override
 
vec3 position () const override
 
vec3 extents () const override
 
rect bounding_box_2d (bool aWithPosition=true) const override
 
void set_animation (const animation_frames &aAnimation) override
 
void set_current_frame (frame_index aFrameIndex) override
 
void set_origin (const vec3 &aOrigin) override
 
void set_position (const vec3 &aPosition) override
 
void clear_extents () override
 
void set_extents (const vec3 &aExtents) override
 
bool has_transformation_matrix () const override
 
void clear_transformation_matrix () override
 
void set_transformation_matrix (const mat33 &aTransformationMatrix) override
 
void set_transformation_matrix (const mat44 &aTransformationMatrix) override
 
bool update (time_interval aNow) override
 
void paint (graphics_context &aGraphicsContext) const override
 
virtual void clear_vertices_cache ()
 
- Public Member Functions inherited from neogfx::i_shape
virtual ~i_shape ()
 
void set_origin (const vec2 &aOrigin)
 
void set_origin (const point &aOrigin)
 
void set_position (const vec2 &aPosition)
 
void set_position (const point &aPosition)
 
void set_extents (const vec2 &aExtents)
 
void set_extents (const size &aExtents)
 
- Public Member Functions inherited from neogfx::i_game_object
virtual ~i_game_object ()
 
virtual const object_typetype () const
 

Detailed Description

Definition at line 55 of file shape.hpp.

Member Typedef Documentation

◆ animation_frame

◆ animation_frames

◆ frame_index

Definition at line 60 of file shape.hpp.

◆ optional_animation_info

Definition at line 79 of file shape.hpp.

◆ optional_time_interval

◆ time_interval [1/2]

Definition at line 61 of file shape.hpp.

◆ time_interval [2/2]

Definition at line 64 of file shape.hpp.

Constructor & Destructor Documentation

◆ shape() [1/13]

neogfx::shape::shape ( )

◆ shape() [2/13]

neogfx::shape::shape ( const colour aColour)

◆ shape() [3/13]

neogfx::shape::shape ( const i_texture aTexture,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [4/13]

neogfx::shape::shape ( const i_image aImage,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [5/13]

neogfx::shape::shape ( const i_texture aTexture,
const rect aTextureRect,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [6/13]

neogfx::shape::shape ( const i_image aImage,
const rect aTextureRect,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [7/13]

neogfx::shape::shape ( i_shape_container aContainer)

◆ shape() [8/13]

neogfx::shape::shape ( i_shape_container aContainer,
const colour aColour 
)

◆ shape() [9/13]

neogfx::shape::shape ( i_shape_container aContainer,
const i_texture aTexture,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [10/13]

neogfx::shape::shape ( i_shape_container aContainer,
const i_image aImage,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [11/13]

neogfx::shape::shape ( i_shape_container aContainer,
const i_texture aTexture,
const rect aTextureRect,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [12/13]

neogfx::shape::shape ( i_shape_container aContainer,
const i_image aImage,
const rect aTextureRect,
const optional_animation_info aAnimationInfo = optional_animation_info() 
)

◆ shape() [13/13]

neogfx::shape::shape ( const shape aOther)

Member Function Documentation

◆ activate_faces()

void neogfx::shape::activate_faces ( face_list  aActiveFaces) const
overridevirtual

Implements neogfx::i_mesh.

◆ active_faces()

face_list neogfx::shape::active_faces ( ) const
overridevirtual

Implements neogfx::i_mesh.

◆ add_frame() [1/2]

void neogfx::shape::add_frame ( i_shape_frame aFrame)
overridevirtual

Implements neogfx::i_shape.

◆ add_frame() [2/2]

void neogfx::shape::add_frame ( std::shared_ptr< i_shape_frame aFrame)
overridevirtual

Implements neogfx::i_shape.

◆ animation()

const animation_frames& neogfx::shape::animation ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ animation_finished()

void neogfx::shape::animation_finished ( )
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::sprite.

◆ as_collidable_object() [1/2]

const i_collidable_object& neogfx::shape::as_collidable_object ( ) const
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ as_collidable_object() [2/2]

i_collidable_object& neogfx::shape::as_collidable_object ( )
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ as_physical_object() [1/2]

const i_physical_object& neogfx::shape::as_physical_object ( ) const
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ as_physical_object() [2/2]

i_physical_object& neogfx::shape::as_physical_object ( )
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ as_shape() [1/2]

const i_shape& neogfx::shape::as_shape ( ) const
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ as_shape() [2/2]

i_shape& neogfx::shape::as_shape ( )
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ bounding_box_2d()

rect neogfx::shape::bounding_box_2d ( bool  aWithPosition = true) const
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::text.

◆ category()

object_category neogfx::shape::category ( ) const
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ clear_extents()

void neogfx::shape::clear_extents ( )
overridevirtual

Implements neogfx::i_shape.

◆ clear_transformation_matrix()

void neogfx::shape::clear_transformation_matrix ( )
overridevirtual

Implements neogfx::i_shape.

◆ clear_vertices_cache()

virtual void neogfx::shape::clear_vertices_cache ( )
virtual

Reimplemented in neogfx::sprite.

◆ container() [1/2]

const i_shape_container& neogfx::shape::container ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ container() [2/2]

i_shape_container& neogfx::shape::container ( )
overridevirtual

Implements neogfx::i_shape.

◆ current_animation_frame()

const animation_frame& neogfx::shape::current_animation_frame ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ current_frame() [1/2]

const i_shape_frame& neogfx::shape::current_frame ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ current_frame() [2/2]

i_shape_frame& neogfx::shape::current_frame ( )
virtual

Implements neogfx::i_shape.

◆ current_frame_index()

frame_index neogfx::shape::current_frame_index ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ extents()

vec3 neogfx::shape::extents ( ) const
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::text.

◆ faces()

face_list neogfx::shape::faces ( ) const
overridevirtual

Implements neogfx::i_mesh.

◆ frame_count()

frame_index neogfx::shape::frame_count ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ has_animation_finished()

bool neogfx::shape::has_animation_finished ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ has_transformation_matrix()

bool neogfx::shape::has_transformation_matrix ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ is_tag()

bool neogfx::shape::is_tag ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ kill()

void neogfx::shape::kill ( )
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ killed()

bool neogfx::shape::killed ( ) const
overridevirtual

Implements neogfx::i_game_object.

Reimplemented in neogfx::sprite.

◆ origin()

vec3 neogfx::shape::origin ( ) const
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::sprite.

◆ paint()

void neogfx::shape::paint ( graphics_context aGraphicsContext) const
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::text.

◆ position()

vec3 neogfx::shape::position ( ) const
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::sprite.

◆ remove_frame()

void neogfx::shape::remove_frame ( frame_index  aFrameIndex)
overridevirtual

Implements neogfx::i_shape.

◆ repeat_animation()

bool neogfx::shape::repeat_animation ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ replace_frame() [1/2]

void neogfx::shape::replace_frame ( frame_index  aFrameIndex,
i_shape_frame aFrame 
)
overridevirtual

Implements neogfx::i_shape.

◆ replace_frame() [2/2]

void neogfx::shape::replace_frame ( frame_index  aFrameIndex,
std::shared_ptr< i_shape_frame aFrame 
)
overridevirtual

Implements neogfx::i_shape.

◆ set_animation()

void neogfx::shape::set_animation ( const animation_frames aAnimation)
overridevirtual

Implements neogfx::i_shape.

◆ set_current_frame()

void neogfx::shape::set_current_frame ( frame_index  aFrameIndex)
overridevirtual

Implements neogfx::i_shape.

◆ set_extents()

void neogfx::shape::set_extents ( const vec3 aExtents)
overridevirtual

Implements neogfx::i_shape.

◆ set_faces()

void neogfx::shape::set_faces ( face_list  aFaces)
overridevirtual

Implements neogfx::i_mesh.

◆ set_origin()

void neogfx::shape::set_origin ( const vec3 aOrigin)
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::sprite.

◆ set_position()

void neogfx::shape::set_position ( const vec3 aPosition)
overridevirtual

Implements neogfx::i_shape.

Reimplemented in neogfx::sprite.

◆ set_tag_of()

void neogfx::shape::set_tag_of ( i_shape aTagOf,
const vec3 aOffset = vec3{} 
)
overridevirtual

Implements neogfx::i_shape.

◆ set_tag_offset()

void neogfx::shape::set_tag_offset ( const vec3 aOffset)
overridevirtual

Implements neogfx::i_shape.

◆ set_textures()

void neogfx::shape::set_textures ( texture_list_pointer  aTextures)
overridevirtual

Implements neogfx::i_mesh.

◆ set_transformation_matrix() [1/2]

void neogfx::shape::set_transformation_matrix ( const mat33 aTransformationMatrix)
overridevirtual

Implements neogfx::i_shape.

◆ set_transformation_matrix() [2/2]

void neogfx::shape::set_transformation_matrix ( const mat44 aTransformationMatrix)
overridevirtual

Implements neogfx::i_shape.

◆ set_vertices()

void neogfx::shape::set_vertices ( vertex_list_pointer  aVertices)
overridevirtual

Implements neogfx::i_mesh.

◆ shape_frame() [1/2]

const i_shape_frame& neogfx::shape::shape_frame ( frame_index  aFrameIndex) const
overridevirtual

Implements neogfx::i_shape.

◆ shape_frame() [2/2]

i_shape_frame& neogfx::shape::shape_frame ( frame_index  aFrameIndex)
overridevirtual

Implements neogfx::i_shape.

◆ tag_of()

i_shape& neogfx::shape::tag_of ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ tag_offset()

const vec3& neogfx::shape::tag_offset ( ) const
overridevirtual

Implements neogfx::i_shape.

◆ textures()

texture_list_pointer neogfx::shape::textures ( ) const
overridevirtual

Implements neogfx::i_mesh.

◆ transformation_matrix()

mat44 neogfx::shape::transformation_matrix ( ) const
overridevirtual

Implements neogfx::i_mesh.

Reimplemented in neogfx::sprite.

◆ transformed_vertices()

const vertex_list& neogfx::shape::transformed_vertices ( ) const
overridevirtual

Implements neogfx::i_mesh.

◆ unset_tag_of()

void neogfx::shape::unset_tag_of ( )
overridevirtual

Implements neogfx::i_shape.

◆ update()

bool neogfx::shape::update ( time_interval  aNow)
overridevirtual

Implements neogfx::i_shape.

◆ vertices()

vertex_list_pointer neogfx::shape::vertices ( ) const
overridevirtual

Implements neogfx::i_mesh.


The documentation for this class was generated from the following file: