本文整理了Java中org.jbox2d.dynamics.Body.<init>()
方法的一些代码示例,展示了Body.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.<init>()
方法的具体详情如下:
包路径:org.jbox2d.dynamics.Body
类名称:Body
方法名:<init>
暂无
代码示例来源:origin: libgdx/libgdx
/**
* create a rigid body given a definition. No reference to the definition is retained.
*
* @warning This function is locked during callbacks.
* @param def
* @return
*/
public Body createBody(BodyDef def) {
assert (isLocked() == false);
if (isLocked()) {
return null;
}
// TODO djm pooling
Body b = new Body(def, this);
// add to world doubly linked list
b.m_prev = null;
b.m_next = m_bodyList;
if (m_bodyList != null) {
m_bodyList.m_prev = b;
}
m_bodyList = b;
++m_bodyCount;
return b;
}
代码示例来源:origin: stackoverflow.com
Content subjContent = new Content().withData("Test of Amazon SES");
Message msg = new Message().withSubject(subjContent);
// Include a body in both text and HTML formats
Content textContent = new Content().withData("Hello - I hope you're having a good day.");
Content htmlContent = new Content().withData("<h1>Hello - I hope you're having a good day.</h1>");
Body body = new Body().withHtml(htmlContent).withText(textContent);
msg.setBody(body);
代码示例来源:origin: jbox2d/jbox2d
/**
* create a rigid body given a definition. No reference to the definition is retained.
*
* @warning This function is locked during callbacks.
* @param def
* @return
*/
public Body createBody(BodyDef def) {
assert (isLocked() == false);
if (isLocked()) {
return null;
}
// TODO djm pooling
Body b = new Body(def, this);
// add to world doubly linked list
b.m_prev = null;
b.m_next = m_bodyList;
if (m_bodyList != null) {
m_bodyList.m_prev = b;
}
m_bodyList = b;
++m_bodyCount;
return b;
}
代码示例来源:origin: stackoverflow.com
for(int i=0; i<body.length; i++) {
// probably some cod here..
body[i] = new Body(..);
// probably some cod here..
}
代码示例来源:origin: stackoverflow.com
b.setB(100);
l.add(b);
b = new Body();
b.setB(20);
l.add(b);
b = new Body();
b.setB(300);
l.add(b);
代码示例来源:origin: stackoverflow.com
//b.setB(100);
l.add(new Body(100));
//b.setB(20);
l.add(new Body(200));
//b.setB(300);
l.add(new Body(300));
代码示例来源:origin: stackoverflow.com
b.setB(100);
l.add(b);
b = new Body();
b.setB(20);
l.add(b);
b = new Body();
b.setB(300);
l.add(b);
代码示例来源:origin: stackoverflow.com
@XmlRootElement(name = "Envelope", namespace = "http://schemas.xmlsoap.org/soap/envelope/")
public class Envelope {
@XmlElement(name = "Body", namespace = "http://schemas.xmlsoap.org/soap/envelope/")
private Body body;
public Body getBody() {
return body;
}
public void setBody() {
this.body = new Body();
}
}
代码示例来源:origin: stackoverflow.com
public Car(){
engine = new Engine()
body = new Body()
tank = new GasTank()
transmission = new Transmission()
}
代码示例来源:origin: stackoverflow.com
import javax.xml.bind.annotation.adapters.XmlAdapter;
public class BodyAdapter extends XmlAdapter<Body, Object>{
@Override
public Object unmarshal(Body v) throws Exception {
return v.getValue();
}
@Override
public Body marshal(Object v) throws Exception {
Body body = new Body();
body.setValue(v);
return body;
}
}
代码示例来源:origin: stackoverflow.com
Body b1 = new Body();
b1.setB(100);
l.add(b1);
Body b2 = new Body();
b2.setB(20);
l.add(b2);
Body b3 = new Body();
b3.setB(300);
l.add(b3);
代码示例来源:origin: stackoverflow.com
Matcher matcher1 = Pattern.compile("(?<=\\{).*?(?<=\\})").matcher(yourInput);
while(mather1.find())
{
Matcher matcher2 = Pattern.compile("(?<=\\[).*?(?=\\])").matcher(matcher1.Group());
while (matcher2.find())
{
Matcher matcher3 = Pattern.compile("(\\d+);(\\d+);(\\d+)").matcher(matcher2.Group());
while (matcher3.find())
{
tp.add(new Point(Double.valueOf(matcher3.Group(1),Double.valueOf(matcher3.Group(2)),Double.valueOf(matcher3.Group(3))));
}
sf.add(new Surface((Point[]) tp.toArray()));
}
convShape.add(new Body((Surface[])sf.toArray()));
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) {
Body[] bodiesArr = new Body[5];
Scanner sc=new Scanner(System.in);
for(int i = 0; i < 5; i++) {
double x = sc.nextDouble();
double y = sc.nextDouble();
String pic = sc.nextLine();
Body body = new Body(x, y, pic);
bodiesArr[i] = body;
}
}
代码示例来源:origin: stackoverflow.com
import javax.xml.bind.*;
import com.rti.rim2016.v1_2.fps.*;
import com.rti.rim2016.v1_2.envelope.GovTalkMessage;
import com.rti.rim2016.v1_2.envelope.GovTalkMessage.Body;
public class Demo {
public static void main(String[] args) throws Exception {
JAXBContext jc = JAXBContext.newInstance("com.rti.rim2016.v1_2.fps:com.rti.rim2016.v1_2.envelope");
GovTalkMessage govTalkMessage = new GovTalkMessage();
Body body = new Body();
IRenvelope irEnvelope = new IRenvelope();
body.getAny().add(irEnvelope);
govTalkMessage.setBody(body);
Marshaller marshaller = jc.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(govTalkMessage, System.out);
}
}
代码示例来源:origin: stackoverflow.com
Body b = new Body();
Body bdum;
LinkedList<Body> l = new LinkedList<Body>();
b.setB(100);
l.add(b);
b.setB(20);
l.add(b);
b.setB(300);
l.add(b);
代码示例来源:origin: stackoverflow.com
Style mainDivStyle = new Style();
mainDivStyle.addCssProperties(AlignItems.CENTER, new BackgroundColor(
CssColorName.AQUA.getColorName()));
Html html = new Html(null) {
Body body = new Body(this) {
Div mainDiv = new Div(this, mainDivStyle);
Footer footer = new Footer(this);
};
};
try {
//to write to a file
html.toOutputStream(new FileOutputStream("/home/ansgar/html_work/html-by-wffweb.html"));
//to print in to console
//System.out.println(html.toHtmlString());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
代码示例来源:origin: stackoverflow.com
Html html = new Html(null) {{
new Head(this);
new Body(this) {{
new H1(this) {{
new NoTag(this, "spacial characters taken from an external resource like file/database : 女 学校 ä ö ü Ä");
}};
}};
}};
System.out.println(html.toHtmlString(StandardCharsets.UTF_8));
代码示例来源:origin: stackoverflow.com
Html html = new Html(null) {
Head head = new Head(this);
Body body = new Body(this) {
Blank blank = new Blank(this, "Hello World");
};
};
// prepends the doc type <!DOCTYPE html>
html.setPrependDocType(true);
System.out.println(html.toHtmlString());
代码示例来源:origin: stackoverflow.com
Html html = new Html(null) {
Head head = new Head(this);
Body body = new Body(this) {
Blank blank = new Blank(this, "Hello World");
};
};
// prepends the doc type <!DOCTYPE html>
html.setPrependDocType(true);
System.out.println(html.toHtmlString());
代码示例来源:origin: stackoverflow.com
class Car implements CarElement {
CarElement[] elements;
public Car() {
//create new Array of elements
this.elements = new CarElement[] { new Wheel("front left"),
new Wheel("front right"), new Wheel("back left") ,
new Wheel("back right"), new Body(), new Engine() };
}
public void accept(CarElementVisitor visitor) {
for(CarElement elem : elements) {
elem.accept(visitor);
}
visitor.visit(this);
}
}
内容来源于网络,如有侵权,请联系作者删除!