Package org.robwork.sdurw_simulation
Class GLFrameGrabberPtr
- java.lang.Object
-
- org.robwork.sdurw_simulation.GLFrameGrabberPtr
-
public class GLFrameGrabberPtr extends java.lang.ObjectPtr 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.FrameGrabberPtrasFrameGrabberPtr()GLFrameGrabberCPtrcptr()voiddelete()GLFrameGrabberderef()The pointer stored in the object.booleanequals(GLFrameGrabber p)static longgetCPtr(GLFrameGrabberPtr obj)GLFrameGrabbergetDeref()Member access operator.intgetHeight()returns the height of the imageImagegetImage()returns the imageintgetWidth()returns the width of the imagevoidgrab(FramePtr frame, State state)booleaninit(SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneViewer_t drawer)initialize the grabber with a scene viewer.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipvoidresize(int width, int height)voidresize(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
-
-