Oolite
Loading...
Searching...
No Matches
OOSmallFragmentBurstEntity Class Reference

#include <OOParticleSystem.h>

Inheritance diagram for OOSmallFragmentBurstEntity:
Collaboration diagram for OOSmallFragmentBurstEntity:

Instance Methods

() - if [implementation]
(void) - update: [implementation]
Instance Methods inherited from OOParticleSystem
(id) - initWithPosition:velocity:count:minSpeed:maxSpeed:duration:baseColor:
(OOTexture *) - texture
(id) - init [implementation]
(NSString *) - descriptionComponents [implementation]
(BOOL) - canCollide [implementation]
(BOOL) - checkCloseCollisionWith: [implementation]
(void) - drawImmediate:translucent: [implementation]
(BOOL) - isEffect [implementation]
Instance Methods inherited from Entity
(NSUInteger) - sessionID
(BOOL) - isShip
(BOOL) - isDock
(BOOL) - isStation
(BOOL) - isSubEntity
(BOOL) - isPlayer
(BOOL) - isPlanet
(BOOL) - isSun
(BOOL) - isSunlit
(BOOL) - isStellarObject
(BOOL) - isSky
(BOOL) - isWormhole
(BOOL) - isVisualEffect
(BOOL) - isWaypoint
(BOOL) - validForAddToUniverse
(void) - addToLinkedLists
(void) - removeFromLinkedLists
(void) - updateLinkedLists
(void) - wasAddedToUniverse
(void) - wasRemovedFromUniverse
(void) - warnAboutHostiles
(CollisionRegion *) - collisionRegion
(void) - setCollisionRegion:
(void) - setUniversalID:
(OOUniversalID) - universalID
(BOOL) - throwingSparks
(void) - setThrowSparks:
(void) - throwSparks
(void) - setOwner:
(id) - owner
(ShipEntity *) - parentEntity
(ShipEntity *) - rootShipEntity
(void) - setPosition:
(void) - setPositionX:y:z:
(HPVector) - position
(Vector) - cameraRelativePosition
(GLfloat) - cameraRangeFront
(GLfloat) - cameraRangeBack
(void) - updateCameraRelativePosition
(Vector) - vectorTo:
(HPVector) - absolutePositionForSubentity
(HPVector) - absolutePositionForSubentityOffset:
(double) - zeroDistance
(double) - camZeroDistance
(NSComparisonResult) - compareZeroDistance:
(BoundingBox) - boundingBox
(GLfloat) - mass
(Quaternion) - orientation
(void) - setOrientation:
(Quaternion) - normalOrientation
(void) - setNormalOrientation:
(void) - orientationChanged
(void) - setVelocity:
(Vector) - velocity
(double) - speed
(GLfloat) - distanceTravelled
(void) - setDistanceTravelled:
(void) - setStatus:
(OOEntityStatus) - status
(void) - setScanClass:
(OOScanClass) - scanClass
(void) - setEnergy:
(GLfloat) - energy
(void) - setMaxEnergy:
(GLfloat) - maxEnergy
(void) - applyRoll:andClimb:
(void) - applyRoll:climb:andYaw:
(void) - moveForward:
(OOMatrix) - rotationMatrix
(OOMatrix) - drawRotationMatrix
(OOMatrix) - transformationMatrix
(OOMatrix) - drawTransformationMatrix
(GLfloat) - collisionRadius
(GLfloat) - frustumRadius
(void) - setCollisionRadius:
(NSMutableArray *) - collisionArray
(void) - applyVelocity:
(void) - takeEnergyDamage:from:becauseOf:weaponIdentifier:
(void) - dumpState
(void) - dumpSelfState
(NSUInteger) - lastDrawCounter
(void) - setLastDrawCounter:
(double) - findCollisionRadius
(BOOL) - isVisible
(BOOL) - isInSpace
(BOOL) - isImmuneToBreakPatternHide
(GLfloat) - universalTime
(GLfloat) - spawnTime
(GLfloat) - timeElapsedSinceSpawn
(void) - setAtmosphereFogging:
(OOColor *) - fogUniform
(void) - dealloc [implementation]
(BOOL) - checkLinkedLists [implementation]
(id< OOWeakReferenceSupport >) - superShaderBindingTarget [implementation]
(Vector) - relativePosition [implementation]
(void) - subEntityReallyDied: [implementation]
(BOOL) - isBreakPattern
(BOOL) - isECMBlast
(BOOL) - isExhaust
(BOOL) - isFlasher
(BOOL) - isVisibleToScripts
(BOOL) - isVisibleToScripts
(NSString *) - oo_jsClassName
(NSString *) - oo_jsClassName
(void) - getJSClass:andPrototype:
(void) - deleteJSSelf
(void) - deleteJSSelf
(JSClassID) - oo_jsClassID
(jsval) - oo_jsValueInContext: [implementation]
(BOOL) - isCascadeWeapon
(BOOL) - isPlayerLikeShip
(GLfloat) - clock [implementation]
(unsigned) - pseudoFixedD100 [implementation]
(unsigned) - pseudoFixedD256 [implementation]
(unsigned) - systemGovernment [implementation]
(unsigned) - systemEconomy [implementation]
(unsigned) - systemTechLevel [implementation]
(unsigned) - systemPopulation [implementation]
(unsigned) - systemProductivity [implementation]
(BOOL) - isShipWithSubEntityShip:
(void) - drawSubEntityImmediate:translucent: [implementation]
Instance Methods inherited from OOWeakRefObject
(id) - weakSelf
(id) - weakRetain [implementation]
(void) - weakRefDied: [implementation]
Instance Methods inherited from <OOWeakReferenceSupport>
(id) - OO_RETURNS_RETAINED

Class Methods

(id) + fragmentBurstFromEntity:

Additional Inherited Members

Public Attributes inherited from Entity
OOUniversalID universalID
unsigned isShip: 1
unsigned isStation: 1
unsigned isPlayer: 1
unsigned isWormhole: 1
unsigned isSubEntity: 1
unsigned hasMoved: 1
unsigned hasRotated: 1
unsigned hasCollided: 1
unsigned isSunlit: 1
unsigned collisionTestFilter: 2
unsigned throw_sparks: 1
unsigned isImmuneToBreakPatternHide: 1
unsigned isExplicitlyNotMainStation: 1
unsigned isVisualEffect: 1
OOScanClass scanClass
GLfloat zero_distance
GLfloat cam_zero_distance
GLfloat no_draw_distance
GLfloat collision_radius
HPVector position
Vector cameraRelativePosition
Quaternion orientation
OOColor * atmosphereFogging
int zero_index
Entity * x_previous
Entity * x_next
Entity * y_previous
Entity * y_next
Entity * z_previous
Entity * z_next
Entity * collision_chain
OOUniversalID shadingEntityID
Entity * collider
CollisionRegion * collisionRegion
Protected Attributes inherited from OOParticleSystem
Vector _particlePosition [kFragmentBurstMaxParticles]
Vector _particleVelocity [kFragmentBurstMaxParticles]
GLfloat _particleColor [kFragmentBurstMaxParticles][4]
GLfloat _particleSize [kFragmentBurstMaxParticles]
unsigned _count
unsigned _particleType
OOTimeDelta _timePassed
OOTimeDelta _duration
double _maxSpeed
Protected Attributes inherited from Entity
HPVector lastPosition
Quaternion lastOrientation
GLfloat distanceTravelled
OOMatrix rotMatrix
Vector velocity
GLfloat energy
GLfloat maxEnergy
BoundingBox boundingBox
GLfloat mass
NSMutableArray * collidingEntities
OOTimeAbsolute spawnTime
struct JSObject * _jsSelf
NSUInteger lastDrawCounter
Protected Attributes inherited from OOWeakRefObject
OOWeakReference * weakSelf

Detailed Description

Definition at line 67 of file OOParticleSystem.h.

Method Documentation

◆ fragmentBurstFromEntity:

+ (id) fragmentBurstFromEntity: (Entity*) entity

Definition at line 272 of file OOParticleSystem.m.

272 :(Entity*)entity
273{
274 return [[[self alloc] initFragmentBurstFrom:[entity position] velocity:[entity velocity] size:[entity collisionRadius]] autorelease];
275}
GLfloat collisionRadius()
Definition Entity.m:830
HPVector position
Definition Entity.m:576
Vector velocity
Definition Entity.m:708

References Entity::collisionRadius, Entity::position, and Entity::velocity.

Referenced by ShipEntity::becomeExplosion, and ShipEntity::becomeLargeExplosion:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ if

- if ((self=[super initWithPosition:fragPosition velocity:fragVelocity count:count minSpeed:kMinSpeed maxSpeed:kMaxSpeed duration:1.5 baseColor:baseColor]))
implementation

Definition at line 262 of file OOParticleSystem.m.

262 :fragPosition velocity:fragVelocity count:count minSpeed:kMinSpeed maxSpeed:kMaxSpeed duration:1.5 baseColor:baseColor])) {
263 for (unsigned i = 0; i < count; i++) {
264 // Note: initWithPosition:... stashes speeds in _particleSize[].
265 _particleSize[i] = 32.0f * kMinSpeed / _particleSize[i];
266 }
267 }
float maxSpeed
GLfloat baseColor[4]
unsigned count
GLfloat _particleSize[kFragmentBurstMaxParticles]

References OOParticleSystem::_particleSize, baseColor, count, kMaxSpeed, maxSpeed, and Entity::velocity.

◆ update:

- (void) update: (OOTimeDelta) delta_t
implementation

Reimplemented from OOParticleSystem.

Definition at line 277 of file OOParticleSystem.m.

277 :(OOTimeDelta)delta_t
278{
279#if FREEZE_PARTICLES
280 if (_timePassed + delta_t > 0.5)
281 delta_t = 0.5 - _timePassed;
282#endif
283
284 [super update:delta_t];
285
286 unsigned i, count = _count;
287 GLfloat(*particleColor)[4] = _particleColor;
288 GLfloat timePassed = _timePassed;
289
290 for (i = 0; i < count; i++) {
291 GLfloat du = 0.5f + (1.0f / 32.0f) * (32 - i);
292 particleColor[i][3] = OOClamp_0_1_f(1.0f - timePassed / du);
293 }
294}
OOINLINE float OOClamp_0_1_f(float value) INLINE_CONST_FUNC
double OOTimeDelta
Definition OOTypes.h:193
OOTimeDelta _timePassed
GLfloat _particleColor[kFragmentBurstMaxParticles][4]

References OOParticleSystem::_count, OOParticleSystem::_particleColor, OOParticleSystem::_timePassed, count, OOClamp_0_1_f(), and OOParticleSystem::update:.

Here is the call graph for this function:

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