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

#include <i_shape.hpp>

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

Classes

struct  bad_frame_index
 
struct  no_shape_container
 
struct  not_a_tag
 

Public Types

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

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

Detailed Description

Definition at line 58 of file i_shape.hpp.

Member Typedef Documentation

◆ animation_frame

Definition at line 64 of file i_shape.hpp.

◆ animation_frames

Definition at line 65 of file i_shape.hpp.

◆ frame_index

typedef std::size_t neogfx::i_shape::frame_index

Definition at line 62 of file i_shape.hpp.

◆ optional_time_interval

Definition at line 66 of file i_shape.hpp.

◆ time_interval

Definition at line 63 of file i_shape.hpp.

Constructor & Destructor Documentation

◆ ~i_shape()

virtual neogfx::i_shape::~i_shape ( )
inlinevirtual

Definition at line 74 of file i_shape.hpp.

Member Function Documentation

◆ add_frame() [1/2]

virtual void neogfx::i_shape::add_frame ( i_shape_frame aFrame)
pure virtual

Implemented in neogfx::shape.

◆ add_frame() [2/2]

virtual void neogfx::i_shape::add_frame ( std::shared_ptr< i_shape_frame aFrame)
pure virtual

Implemented in neogfx::shape.

◆ animation()

virtual const animation_frames& neogfx::i_shape::animation ( ) const
pure virtual

Implemented in neogfx::shape.

◆ animation_finished()

virtual void neogfx::i_shape::animation_finished ( )
pure virtual

Implemented in neogfx::shape, and neogfx::sprite.

◆ bounding_box_2d()

virtual rect neogfx::i_shape::bounding_box_2d ( bool  aWithPosition = true) const
pure virtual

Implemented in neogfx::shape, and neogfx::text.

◆ clear_extents()

virtual void neogfx::i_shape::clear_extents ( )
pure virtual

Implemented in neogfx::shape.

◆ clear_transformation_matrix()

virtual void neogfx::i_shape::clear_transformation_matrix ( )
pure virtual

Implemented in neogfx::shape.

◆ container() [1/2]

virtual const i_shape_container& neogfx::i_shape::container ( ) const
pure virtual

Implemented in neogfx::shape.

◆ container() [2/2]

virtual i_shape_container& neogfx::i_shape::container ( )
pure virtual

Implemented in neogfx::shape.

◆ current_animation_frame()

virtual const animation_frame& neogfx::i_shape::current_animation_frame ( ) const
pure virtual

Implemented in neogfx::shape.

◆ current_frame() [1/2]

virtual const i_shape_frame& neogfx::i_shape::current_frame ( ) const
pure virtual

Implemented in neogfx::shape.

◆ current_frame() [2/2]

virtual i_shape_frame& neogfx::i_shape::current_frame ( )
pure virtual

Implemented in neogfx::shape.

◆ current_frame_index()

virtual frame_index neogfx::i_shape::current_frame_index ( ) const
pure virtual

Implemented in neogfx::shape.

◆ extents()

virtual vec3 neogfx::i_shape::extents ( ) const
pure virtual

Implemented in neogfx::shape, and neogfx::text.

◆ frame_count()

virtual frame_index neogfx::i_shape::frame_count ( ) const
pure virtual

Implemented in neogfx::shape.

◆ has_animation_finished()

virtual bool neogfx::i_shape::has_animation_finished ( ) const
pure virtual

Implemented in neogfx::shape.

◆ has_transformation_matrix()

virtual bool neogfx::i_shape::has_transformation_matrix ( ) const
pure virtual

Implemented in neogfx::shape.

◆ is_tag()

virtual bool neogfx::i_shape::is_tag ( ) const
pure virtual

Implemented in neogfx::shape.

◆ origin()

virtual vec3 neogfx::i_shape::origin ( ) const
pure virtual

◆ paint()

virtual void neogfx::i_shape::paint ( graphics_context aGraphicsContext) const
pure virtual

Implemented in neogfx::shape, and neogfx::text.

◆ position()

virtual vec3 neogfx::i_shape::position ( ) const
pure virtual

◆ remove_frame()

virtual void neogfx::i_shape::remove_frame ( frame_index  aFrameIndex)
pure virtual

Implemented in neogfx::shape.

◆ repeat_animation()

virtual bool neogfx::i_shape::repeat_animation ( ) const
pure virtual

Implemented in neogfx::shape.

◆ replace_frame() [1/2]

virtual void neogfx::i_shape::replace_frame ( frame_index  aFrameIndex,
i_shape_frame aFrame 
)
pure virtual

Implemented in neogfx::shape.

◆ replace_frame() [2/2]

virtual void neogfx::i_shape::replace_frame ( frame_index  aFrameIndex,
std::shared_ptr< i_shape_frame aFrame 
)
pure virtual

Implemented in neogfx::shape.

◆ set_animation()

virtual void neogfx::i_shape::set_animation ( const animation_frames aAnimation)
pure virtual

Implemented in neogfx::shape.

◆ set_current_frame()

virtual void neogfx::i_shape::set_current_frame ( frame_index  aFrameIndex)
pure virtual

Implemented in neogfx::shape.

◆ set_extents() [1/3]

virtual void neogfx::i_shape::set_extents ( const vec3 aExtents)
pure virtual

Implemented in neogfx::shape.

◆ set_extents() [2/3]

void neogfx::i_shape::set_extents ( const vec2 aExtents)
inline

Definition at line 143 of file i_shape.hpp.

◆ set_extents() [3/3]

void neogfx::i_shape::set_extents ( const size aExtents)
inline

Definition at line 147 of file i_shape.hpp.

◆ set_origin() [1/3]

virtual void neogfx::i_shape::set_origin ( const vec3 aOrigin)
pure virtual

◆ set_origin() [2/3]

void neogfx::i_shape::set_origin ( const vec2 aOrigin)
inline

Definition at line 127 of file i_shape.hpp.

◆ set_origin() [3/3]

void neogfx::i_shape::set_origin ( const point aOrigin)
inline

Definition at line 131 of file i_shape.hpp.

◆ set_position() [1/3]

virtual void neogfx::i_shape::set_position ( const vec3 aPosition)
pure virtual

◆ set_position() [2/3]

void neogfx::i_shape::set_position ( const vec2 aPosition)
inline

Definition at line 135 of file i_shape.hpp.

◆ set_position() [3/3]

void neogfx::i_shape::set_position ( const point aPosition)
inline

Definition at line 139 of file i_shape.hpp.

◆ set_tag_of()

virtual void neogfx::i_shape::set_tag_of ( i_shape aTagOf,
const vec3 aOffset = vec3{} 
)
pure virtual

Implemented in neogfx::shape.

◆ set_tag_offset()

virtual void neogfx::i_shape::set_tag_offset ( const vec3 aOffset)
pure virtual

Implemented in neogfx::shape.

◆ set_transformation_matrix() [1/2]

virtual void neogfx::i_shape::set_transformation_matrix ( const mat33 aTransformationMatrix)
pure virtual

Implemented in neogfx::shape.

◆ set_transformation_matrix() [2/2]

virtual void neogfx::i_shape::set_transformation_matrix ( const mat44 aTransformationMatrix)
pure virtual

Implemented in neogfx::shape.

◆ shape_frame() [1/2]

virtual const i_shape_frame& neogfx::i_shape::shape_frame ( frame_index  aFrameIndex) const
pure virtual

Implemented in neogfx::shape.

◆ shape_frame() [2/2]

virtual i_shape_frame& neogfx::i_shape::shape_frame ( frame_index  aFrameIndex)
pure virtual

Implemented in neogfx::shape.

◆ tag_of()

virtual i_shape& neogfx::i_shape::tag_of ( ) const
pure virtual

Implemented in neogfx::shape.

◆ tag_offset()

virtual const vec3& neogfx::i_shape::tag_offset ( ) const
pure virtual

Implemented in neogfx::shape.

◆ unset_tag_of()

virtual void neogfx::i_shape::unset_tag_of ( )
pure virtual

Implemented in neogfx::shape.

◆ update()

virtual bool neogfx::i_shape::update ( time_interval  aNow)
pure virtual

Implemented in neogfx::shape.


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