Homec4science

Graphics project structure change

Authored by ancarola on Mar 24 2018, 20:28.

Description

Graphics project structure change

Multiple inheritance implemented

Specs interfaces:

  • Evolvable: allows to evolve/update the current status
  • Renderable: allows to render the current status
  • Positionable: allows to load the current position
  • Orientable: allows to orientate the object using angular coordinates
  • Scalable: allows to scale the object
  • Colorable: allows to assign a color to the object
  • Descriptable: allows to assign a physics or mathematical behaviour

Actors:

  • SKActor inherits Evolvable:

    This is the abstract base class which implements an evolvable behaviour A Scene will take SKActors as arguments and nothing more
  • Shape inherits SKActor, Renderable, Colorable:

    This is the abstract class for a single graphical object instanciation
  • Decoration inherits Shape, Positionable, Orientable, Scalable:

    This a graphical object which has the evolution flag disabled It can be positioned, oriented and scaled
  • Particle inherits Shape, Descriptable

    This object implements a descriptable behaviour Precisely the descriptor associated to this class is the NewtonDescriptor So you can bind forces dynamically and it doesn't depend on a fixed differential equation
  • ParticleSystem inherits SKActor, Renderable

    This is a container for Particle instances It performs dynamic interactions definible in subclasses

Others:

  • sktools.h

    This header contains public fonctions for opengl rendering and matrix binding.
  • specs.h

    This header contains the specs flags definitions. The flags system uses macros in order to bind the right functions using the most optimal implementation.

Overview on the specs flags:

The idea is to group all boolean flags into single bits
A SKActor contains a number such that, every bit of this
number corresponds to a flag bit.
Flags bits are:

- S_EVOLVE      0x1
- S_RENDER      0x2
- S_FILL_MODE   0x4
- S_POSITION    0x8
- S_ORIENTATION 0x10
- S_SCALING     0x20
- S_COLOR       0x40

Every flags is related to a particular specs interface

Details

Committed
ancarolaMar 24 2018, 20:28
Pushed
ancarolaMar 24 2018, 21:07
Parents
rSYMKIT9cbb108ff674: Shape rendering system improved in conception
Branches
Unknown
Tags
Unknown