public class AutoTraceRay extends GBObjectUpdate implements IGBWorldObjectEvent, IWorldObject
IWorldObjectUpdatedEvent.DestroyWorldObject| Modifier and Type | Field and Description |
|---|---|
protected boolean |
FastTrace
True if it is a fast trace, false if not (fast trace is a
bit faster version of UDK ray trace - but provides us
with less information - just true/false if we hit something
on the way or not).
|
protected boolean |
FloorCorrection
If we should correct ray directions accoring floor normal.
|
protected Location |
From
Location from which the ray is emitted.
|
protected UnrealId |
HitId
Id of the actor we have hit.
|
protected Location |
HitLocation
Vector with location of the collision (not sent if FastTrace
is True).
|
protected javax.vecmath.Vector3d |
HitNormal
Vector with normal of the plane we have hit (not sent if
FastTrace is True).
|
protected UnrealId |
Id
An Id for this ray (should be unique), assigned by the user
when adding ray.
|
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected boolean |
Result
True if it hit something, false if not.
|
protected double |
Time |
protected Location |
To
Location to which the ray is sent.
|
protected boolean |
TraceActors
If we traced also actors with this ray (actors – moving
things in a game – bots, players, monsters, pickup …) (only
if NOT using FastTrace)
|
| Constructor and Description |
|---|
AutoTraceRay()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
|
AutoTraceRay(AutoTraceRay original)
Cloning constructor.
|
AutoTraceRay(UnrealId Id,
Location From,
Location To,
boolean FastTrace,
boolean FloorCorrection,
boolean Result,
javax.vecmath.Vector3d HitNormal,
Location HitLocation,
boolean TraceActors,
UnrealId HitId)
Creates new instance of command AutoTraceRay.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Location |
getFrom()
Location from which the ray is emitted.
|
UnrealId |
getHitId()
Id of the actor we have hit.
|
Location |
getHitLocation()
Vector with location of the collision (not sent if FastTrace
is True).
|
javax.vecmath.Vector3d |
getHitNormal()
Vector with normal of the plane we have hit (not sent if
FastTrace is True).
|
UnrealId |
getId()
An Id for this ray (should be unique), assigned by the user
when adding ray.
|
double |
getLastSeenTime() |
ILocalWorldObject |
getLocal() |
IWorldObject |
getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true
as the original object is updated and then the event is propagated).
|
ISharedWorldObject |
getShared() |
long |
getSimTime() |
IStaticWorldObject |
getStatic() |
protected double |
getTime() |
Location |
getTo()
Location to which the ray is sent.
|
int |
hashCode() |
boolean |
isFastTrace()
True if it is a fast trace, false if not (fast trace is a
bit faster version of UDK ray trace - but provides us
with less information - just true/false if we hit something
on the way or not).
|
boolean |
isFloorCorrection()
If we should correct ray directions accoring floor normal.
|
boolean |
isResult()
True if it hit something, false if not.
|
boolean |
isTraceActors()
If we traced also actors with this ray (actors – moving
things in a game – bots, players, monsters, pickup …) (only
if NOT using FastTrace)
|
protected void |
setTime(double time) |
String |
toHtmlString() |
String |
toString() |
IWorldObjectUpdateResult |
update(IWorldObject obj) |
toJsonLiteralpublic static final String PROTOTYPE
protected UnrealId Id
protected Location From
protected Location To
protected boolean FastTrace
protected boolean FloorCorrection
protected boolean Result
protected javax.vecmath.Vector3d HitNormal
protected Location HitLocation
protected boolean TraceActors
protected UnrealId HitId
protected double Time
public AutoTraceRay(UnrealId Id, Location From, Location To, boolean FastTrace, boolean FloorCorrection, boolean Result, javax.vecmath.Vector3d HitNormal, Location HitLocation, boolean TraceActors, UnrealId HitId)
Id - An Id for this ray (should be unique), assigned by the user
when adding ray.From - Location from which the ray is emitted.To - Location to which the ray is sent.FastTrace - True if it is a fast trace, false if not (fast trace is a
bit faster version of UDK ray trace - but provides us
with less information - just true/false if we hit something
on the way or not).FloorCorrection - If we should correct ray directions accoring floor normal. Note: Has issue - we can't set set rays up or down when correction is active.Result - True if it hit something, false if not.HitNormal - Vector with normal of the plane we have hit (not sent if
FastTrace is True).HitLocation - Vector with location of the collision (not sent if FastTrace
is True).TraceActors - If we traced also actors with this ray (actors – moving
things in a game – bots, players, monsters, pickup …) (only
if NOT using FastTrace)HitId - Id of the actor we have hit. (Sent if FastTrace is False and
TraceActors is True).public AutoTraceRay(AutoTraceRay original)
public AutoTraceRay()
public UnrealId getId()
getId in interface IWorldObjectUpdatedEventgetId in interface IWorldObjectpublic Location getFrom()
public Location getTo()
public boolean isFastTrace()
public boolean isFloorCorrection()
public boolean isResult()
public javax.vecmath.Vector3d getHitNormal()
public Location getHitLocation()
public boolean isTraceActors()
public UnrealId getHitId()
protected double getTime()
protected void setTime(double time)
public double getLastSeenTime()
public ILocalWorldObject getLocal()
public ISharedWorldObject getShared()
public IStaticWorldObject getStatic()
public long getSimTime()
getSimTime in interface IWorldChangeEventgetSimTime in interface IWorldObjectpublic IWorldObjectUpdateResult update(IWorldObject obj)
update in interface IWorldObjectUpdatedEventpublic IWorldObject getObject()
public String toString()
toString in class InfoMessagepublic String toHtmlString()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.