Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gamp::graph::ui::Shape Class Reference

#include <Shape.hpp>

Collaboration diagram for gamp::graph::ui::Shape:

Public Types

typedef jau::function< void(ShapeRef &s, const Vec3f &origin, const Vec3f &dest, const PointerEvent &e)> MoveEventCallback
 Shape move listener
 
typedef jau::function< void(ShapeRef &s, const Vec3f &pos, const PointerEvent &e)> PointerEventCallback
 Shape pointer listener, e.g.
 
typedef jau::function< void(ShapeRef &s)> ShapeEventCallback
 General Shape listener action.
 
typedef jau::function< bool(ShapeRef &s)> Visitor1Func
 Visitor1 method.
 
typedef jau::function< bool(ShapeRef &s, PMVMat4f &pmv)> Visitor2Func
 Visitor2 method.
 

Public Member Functions

 Shape ()
 
void applyMatToMv (PMVMat4f &pmvMat) noexcept
 Applies the internal Matrix4f to the given modelview matrix, i.e.
 
virtual ContainerasContainer () const noexcept
 
constexpr const Vec4fcolor () const noexcept
 
constexpr const OutlineShapeoutlines () const noexcept
 
constexpr OutlineShapeoutlines () noexcept
 
constexpr const Vec3fposition () const noexcept
 
constexpr Vec3fposition () noexcept
 
constexpr const Quat4frotation () const noexcept
 
constexpr Quat4frotation () noexcept
 
constexpr const Vec3frotationPivot () const noexcept
 
constexpr Vec3frotationPivot () noexcept
 
constexpr const Vec3fscale () const noexcept
 
constexpr Vec3fscale () noexcept
 
constexpr void setColor (const Vec4f &c) noexcept
 
constexpr const float & zOffset () const noexcept
 
constexpr float & zOffset () noexcept
 

Detailed Description

Definition at line 49 of file Shape.hpp.

Member Typedef Documentation

◆ Visitor1Func

Visitor1 method.

Parameters
sthe Shape to process
Returns
true to signal operation complete and to stop traversal, otherwise false

Definition at line 56 of file Shape.hpp.

◆ Visitor2Func

Visitor2 method.

Parameters
sthe Shape to process
pmvthe PMVMatrix4f setup from the Scene down to the Shape
Returns
true to signal operation complete and to stop traversal, otherwise false

Definition at line 64 of file Shape.hpp.

◆ MoveEventCallback

typedef jau::function<void(ShapeRef& s, const Vec3f& origin, const Vec3f& dest, const PointerEvent& e)> gamp::graph::ui::Shape::MoveEventCallback

Shape move listener

Parameters
sthe moved shape
originoriginal position, relative object coordinates to the associated Shape
destnew position, relative object coordinates to the associated Shape
eoriginal Newt MouseEvent

Definition at line 73 of file Shape.hpp.

◆ PointerEventCallback

Shape pointer listener, e.g.

for Shape#onClicked(PointerListener)

Parameters
sthe associated Shape for this event
posrelative object coordinates to the associated Shape
eoriginal Newt MouseEvent

Definition at line 81 of file Shape.hpp.

◆ ShapeEventCallback

General Shape listener action.

Definition at line 86 of file Shape.hpp.

Constructor & Destructor Documentation

◆ Shape()

gamp::graph::ui::Shape::Shape ( )
inline

Definition at line 120 of file Shape.hpp.

Member Function Documentation

◆ asContainer()

virtual Container * gamp::graph::ui::Shape::asContainer ( ) const
inlinevirtualnoexcept

Definition at line 124 of file Shape.hpp.

◆ position() [1/2]

const Vec3f & gamp::graph::ui::Shape::position ( ) const
inlineconstexprnoexcept

Definition at line 126 of file Shape.hpp.

◆ position() [2/2]

Vec3f & gamp::graph::ui::Shape::position ( )
inlineconstexprnoexcept

Definition at line 127 of file Shape.hpp.

◆ zOffset() [1/2]

const float & gamp::graph::ui::Shape::zOffset ( ) const
inlineconstexprnoexcept

Definition at line 129 of file Shape.hpp.

◆ zOffset() [2/2]

float & gamp::graph::ui::Shape::zOffset ( )
inlineconstexprnoexcept

Definition at line 130 of file Shape.hpp.

◆ rotation() [1/2]

const Quat4f & gamp::graph::ui::Shape::rotation ( ) const
inlineconstexprnoexcept

Definition at line 132 of file Shape.hpp.

◆ rotation() [2/2]

Quat4f & gamp::graph::ui::Shape::rotation ( )
inlineconstexprnoexcept

Definition at line 133 of file Shape.hpp.

◆ rotationPivot() [1/2]

const Vec3f & gamp::graph::ui::Shape::rotationPivot ( ) const
inlineconstexprnoexcept

Definition at line 135 of file Shape.hpp.

◆ rotationPivot() [2/2]

Vec3f & gamp::graph::ui::Shape::rotationPivot ( )
inlineconstexprnoexcept

Definition at line 136 of file Shape.hpp.

◆ scale() [1/2]

const Vec3f & gamp::graph::ui::Shape::scale ( ) const
inlineconstexprnoexcept

Definition at line 138 of file Shape.hpp.

◆ scale() [2/2]

Vec3f & gamp::graph::ui::Shape::scale ( )
inlineconstexprnoexcept

Definition at line 139 of file Shape.hpp.

◆ outlines() [1/2]

const OutlineShape & gamp::graph::ui::Shape::outlines ( ) const
inlineconstexprnoexcept

Definition at line 141 of file Shape.hpp.

◆ outlines() [2/2]

OutlineShape & gamp::graph::ui::Shape::outlines ( )
inlineconstexprnoexcept

Definition at line 142 of file Shape.hpp.

◆ color()

const Vec4f & gamp::graph::ui::Shape::color ( ) const
inlineconstexprnoexcept

Definition at line 144 of file Shape.hpp.

◆ setColor()

void gamp::graph::ui::Shape::setColor ( const Vec4f & c)
inlineconstexprnoexcept

Definition at line 145 of file Shape.hpp.

◆ applyMatToMv()

void gamp::graph::ui::Shape::applyMatToMv ( PMVMat4f & pmvMat)
inlinenoexcept

Applies the internal Matrix4f to the given modelview matrix, i.e.

pmv.mulMv( getMat() ).

Calls updateMat() if dirty.

In case isMatIdentity() is true, implementation is a no-operation.

Parameters
pmvthe matrix
See also
#isMatIdentity()
updateMat()
#getMat()
PMVMatrix4f#mulMv(Matrix4f)

Definition at line 161 of file Shape.hpp.


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