예제 #1
0
func (self *DefaultRenderer) drawAttachments(renderData *planeRenderData, translucent bool) {
	currentDrawInfo := scenery.NewDrawInfoLocal(renderData.x, renderData.y, renderData.z, renderData.plane.PositionData.Pitch, renderData.plane.PositionData.Heading, renderData.plane.PositionData.Roll)
	for _, currentAttachment := range renderData.plane.CslAircraft.Attachments {
		if currentAttachment.ObjectReference == nil {
			go self.loadAttachment(currentAttachment)
		} else if (translucent && currentAttachment.DrawType == csl.CSL_DRAW_GLASS) || (!translucent && currentAttachment.DrawType != csl.CSL_DRAW_GLASS) {
			scenery.DrawObjects(currentAttachment.ObjectReference, 1, []scenery.DrawInfo{currentDrawInfo}, true, false)
		}

	}
}
예제 #2
0
func appendLight(renderData *planeRenderData, currentLight *obj7.LightInfo, drawInfos []scenery.DrawInfo) []scenery.DrawInfo {
	return append(drawInfos, scenery.NewDrawInfoLocal(renderData.x+currentLight.XYZ[0], renderData.y+currentLight.XYZ[1], renderData.z+currentLight.XYZ[2], renderData.plane.PositionData.Pitch, renderData.plane.PositionData.Heading, renderData.plane.PositionData.Roll))

}