Package org.robwork.sdurw_simulation
Class FrameGrabberPtr
- java.lang.Object
-
- org.robwork.sdurw_simulation.FrameGrabberPtr
-
public class FrameGrabberPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description FrameGrabberPtr()
Default constructor yielding a NULL-pointer.FrameGrabberPtr(long cPtr, boolean cMemoryOwn)
FrameGrabberPtr(FrameGrabber 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 FrameGrabber
__ref__()
Dereferencing operator.void
delete()
FrameGrabber
deref()
The pointer stored in the object.boolean
equals(FrameGrabber p)
static long
getCPtr(FrameGrabberPtr obj)
FrameGrabber
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)
this function grabs a image from the specialized source and
copies it to the FrameGrabber image.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
resize(int width, int height)
resizes the image that this frameGrabber use.void
resize(int width, int height, Image.ColorCode colorCode)
resizes the image that this frameGrabber use.
-
-
-
Constructor Detail
-
FrameGrabberPtr
public FrameGrabberPtr(long cPtr, boolean cMemoryOwn)
-
FrameGrabberPtr
public FrameGrabberPtr()
Default constructor yielding a NULL-pointer.
-
FrameGrabberPtr
public FrameGrabberPtr(FrameGrabber ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(FrameGrabberPtr obj)
-
delete
public void delete()
-
deref
public FrameGrabber deref()
The pointer stored in the object.
-
__ref__
public FrameGrabber __ref__()
Dereferencing operator.
-
getDeref
public FrameGrabber getDeref()
Member access operator.
-
equals
public boolean equals(FrameGrabber 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
-
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
-
resize
public void resize(int width, int height)
resizes the image that this frameGrabber use. The colorcode will
default to the one that FrameGrabber was initialized with.- Parameters:
width
- [in] width of imageheight
- [in] height of image
-
resize
public void resize(int width, int height, Image.ColorCode colorCode)
resizes the image that this frameGrabber use.- Parameters:
width
- [in] width of image.height
- [in] height of image.colorCode
- [in] Color encoding of the image.
-
getImage
public Image getImage()
returns the image- Returns:
- the image
-
-