Package org.robwork.sdurw_simulation
Class GLFrameGrabberPtr
- java.lang.Object
-
- org.robwork.sdurw_simulation.GLFrameGrabberPtr
-
public class GLFrameGrabberPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description GLFrameGrabberPtr()
Default constructor yielding a NULL-pointer.GLFrameGrabberPtr(long cPtr, boolean cMemoryOwn)
GLFrameGrabberPtr(GLFrameGrabber ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GLFrameGrabber
__ref__()
Dereferencing operator.FrameGrabberPtr
asFrameGrabberPtr()
GLFrameGrabberCPtr
cptr()
void
delete()
GLFrameGrabber
deref()
The pointer stored in the object.boolean
equals(GLFrameGrabber p)
static long
getCPtr(GLFrameGrabberPtr obj)
GLFrameGrabber
getDeref()
Member access operator.int
getHeight()
returns the height of the imageImage
getImage()
returns the imageint
getWidth()
returns the width of the imagevoid
grab(FramePtr frame, State state)
boolean
init(SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneViewer_t drawer)
initialize the grabber with a scene viewer.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
resize(int width, int height)
void
resize(int width, int height, Image.ColorCode colorCode)
-
-
-
Constructor Detail
-
GLFrameGrabberPtr
public GLFrameGrabberPtr(long cPtr, boolean cMemoryOwn)
-
GLFrameGrabberPtr
public GLFrameGrabberPtr()
Default constructor yielding a NULL-pointer.
-
GLFrameGrabberPtr
public GLFrameGrabberPtr(GLFrameGrabber ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(GLFrameGrabberPtr obj)
-
delete
public void delete()
-
deref
public GLFrameGrabber deref()
The pointer stored in the object.
-
__ref__
public GLFrameGrabber __ref__()
Dereferencing operator.
-
getDeref
public GLFrameGrabber getDeref()
Member access operator.
-
equals
public boolean equals(GLFrameGrabber p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public GLFrameGrabberCPtr cptr()
-
asFrameGrabberPtr
public FrameGrabberPtr asFrameGrabberPtr()
-
resize
public void resize(int width, int height)
-
resize
public void resize(int width, int height, Image.ColorCode colorCode)
-
init
public boolean init(SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneViewer_t drawer)
initialize the grabber with a scene viewer. This registers the grabber
as a camera in the scene and enables rendering.- Parameters:
drawer
- [in] the scene viewer- Returns:
- true if initialization succeeded, false otherwise (depends on the capabilities of
the SceneViewer).
-
getWidth
public int getWidth()
returns the width of the image- Returns:
- the width of the image
-
getHeight
public int getHeight()
returns the height of the image- Returns:
- the height of the image
-
getImage
public Image getImage()
returns the image- Returns:
- the image
-
-