Triton
Visual simulation library for ocean rendering.
Impact.h
Go to the documentation of this file.
1// Copyright (c) 2013 Sundog Software, LLC. All rights reserved worldwide.
2
3#ifndef TRITON_IMPACT_H
4#define TRITON_IMPACT_H
5
6#ifdef SWIG
7%module TritonImpact
8%import "Ocean.h"
9#define TRITONAPI
10%{
11#include "Impact.h"
12using namespace Triton;
13%}
14#endif
15
16#include "TritonCommon.h"
17#include "Vector3.h"
18
23#pragma pack(push)
24#pragma pack(8)
25
26namespace Triton
27{
28class Ocean;
29
32class Impact : public MemObject
33{
34public:
43 Impact(Ocean *pOcean, double pImpactorDiameter, double pMass, bool pSprayEffects = false, double pSprayScale = 2.0);
44
54 void TRITONAPI Trigger(const Vector3& pPosition, const Vector3& pDirection, double pVelocity, double pTime);
55
59 Vector3 TRITONAPI GetPosition() const {
60 return position;
61 }
62
67 double TRITONAPI GetVelocity() const {
68 return velocity;
69 }
70
71protected:
72 Vector3 position;
73 double velocity, impactorDiameter;
74 Ocean *ocean;
75 bool sprayEffects;
76 int wakeNumber;
77 int numSprays;
78 double energyScale;
79 double sprayScale;
80 double mass;
81 double maxEnergy;
82 double positionVariation;
83 float transparency;
84 double decayRate;
85};
86}
87
88#pragma pack(pop)
89
90#endif
An object that generates impact wave and spray effects, ie from projectiles or explosions.
Common typedefs and defines used within Triton.
A 3D Vector class and its operations.
A RotorWash object will generate spray and circular waves on the ocean surface in the direction it is...
Definition: Impact.h:33
Vector3 TRITONAPI GetPosition() const
Retrieves the world position of the Impact.
Definition: Impact.h:59
double TRITONAPI GetVelocity() const
Retrieves the velocity of the Impact.
Definition: Impact.h:67
Impact(Ocean *pOcean, double pImpactorDiameter, double pMass, bool pSprayEffects=false, double pSprayScale=2.0)
Construct a Impact with the Triton::Ocean it will be associated with.
void TRITONAPI Trigger(const Vector3 &pPosition, const Vector3 &pDirection, double pVelocity, double pTime)
Starts the effect of an impact at a given position, direction, and velocity.
This base class for all Triton objects intercepts the new and delete operators, routing them through ...
Definition: MemAlloc.h:71
The Ocean class allows you to configure and draw Triton's water simulation.
Definition: Ocean.h:81
A 3D double-precision Vector class and its operations.
Definition: Vector3.h:36