Ejemplo n.º 1
0
ccGenericMesh::ccGenericMesh(ccGenericPointCloud* associatedCloud, QString name/*=QString()*/)
    : GenericIndexedMesh()
    , ccHObject(name)
    , m_showWired(false)
    , m_associatedCloud(associatedCloud)
    , m_triNormals(0)
    , m_texCoords(0)
    , m_materials(0)
{
    setVisible(true);
    lockVisibility(false);
}
Ejemplo n.º 2
0
cc2DLabel::cc2DLabel(QString name/*=QString()*/)
	: ccHObject(name.isEmpty() ? "label" : name)
	, m_showFullBody(true)
	, m_dispIn3D(true)
	, m_dispIn2D(true)
{
	m_screenPos[0]=m_screenPos[1]=0.05f;
	clear();

	lockVisibility(false);
	setEnabled(true);
}
Ejemplo n.º 3
0
ccOctree::ccOctree(ccGenericPointCloud* aCloud)
	: CCLib::DgmOctree(aCloud)
	, ccHObject("Octree")
	, m_associatedCloud(aCloud)
	, m_displayType(DEFAULT_OCTREE_DISPLAY_TYPE)
	, m_displayedLevel(1)
	, m_glListID(-1)
	, m_shouldBeRefreshed(true)
{
	setVisible(false);
	lockVisibility(false);
}
Ejemplo n.º 4
0
ccHObject::ccHObject(QString name/*=QString()*/)
	: ccObject(name)
	, ccDrawableObject()
	, m_parent(0)
	, m_selectionBehavior(SELECTION_AA_BBOX)////m_selectionBehavior(SELECTION_AA_BBOX) 
	, m_isDeleting(false){

	setVisible(false); // 默认不可见
	lockVisibility(true); //锁定可视性,用户不可修改
	
	m_glTransHistory.toIdentity(); //历史变换矩阵设置成单位阵
}
Ejemplo n.º 5
0
ccPolyline::ccPolyline(GenericIndexedCloudPersist* associatedCloud)
	: Polyline(associatedCloud)
	, ccHObject("Polyline")
{
	set2DMode(false);
	setForeground(true);
	setVisible(true);
	lockVisibility(false);
	setColor(ccColor::white);
	showVertices(false);
	setVertexMarkerWidth(3);
	setWidth(0);
}
Ejemplo n.º 6
0
ccPolyline::ccPolyline(const ccPolyline& poly)
	: Polyline(ccPointCloud::From(poly.getAssociatedCloud()))
	, ccHObject("Polyline")
{
	assert(m_theAssociatedCloud);
	if (m_theAssociatedCloud)
		addPointIndex(0,m_theAssociatedCloud->size());
	setClosingState(poly.m_isClosed);
	set2DMode(poly.m_mode2D);
	setForeground(poly.m_foreground);
	setVisible(poly.isVisible());
	lockVisibility(poly.isVisiblityLocked());
	setColor(poly.m_rgbColor);
}
Ejemplo n.º 7
0
ccDrawableObject::ccDrawableObject()
{
    setVisible(true);
    setSelected(false);
    showColors(false);
    showNormals(false);
    showSF(false);
	lockVisibility(false);
	showNameIn3D(false);
    m_currentDisplay=0;

    enableTempColor(false);
    setTempColor(ccColor::white,false);
    razGLTransformation();
}
Ejemplo n.º 8
0
bool ccPolyline::initWith(ccPointCloud*& vertices, const ccPolyline& poly)
{
	bool success = true;
	if (!vertices)
	{
		ccPointCloud* cloud = dynamic_cast<ccPointCloud*>(poly.m_theAssociatedCloud);
		ccPointCloud* clone = cloud ? cloud->partialClone(&poly) : ccPointCloud::From(&poly);
		if (clone)
		{
			if (cloud)
				clone->setName(cloud->getName()); //as 'partialClone' adds the '.extract' suffix by default
		}
		else
		{
			//not enough memory?
			ccLog::Warning("[ccPolyline::initWith] Not enough memory to duplicate vertices!");
			success = false;
		}

		vertices = clone;
	}

	if (vertices)
	{
		setAssociatedCloud(vertices);
		addChild(vertices);
		//vertices->setEnabled(false);
		assert(m_theAssociatedCloud);
		if (m_theAssociatedCloud)
			addPointIndex(0,m_theAssociatedCloud->size());
	}

	setClosed(poly.m_isClosed);
	set2DMode(poly.m_mode2D);
	setForeground(poly.m_foreground);
	setVisible(poly.isVisible());
	lockVisibility(poly.isVisiblityLocked());
	setColor(poly.m_rgbColor);
	setWidth(poly.m_width);
	showColors(poly.colorsShown());
	showVertices(poly.verticesShown());
	setVertexMarkerWidth(poly.getVertexMarkerWidth());
	setVisible(poly.isVisible());
	
	return success;
}
Ejemplo n.º 9
0
ccGBLSensor::ccGBLSensor(ROTATION_ORDER rotOrder/*=YAW_THEN_PITCH*/)
	: ccSensor("Ground Based Laser Scanner")
	, m_phiMin(0)
	, m_phiMax(0)
	, m_deltaPhi(0)
	, m_pitchAnglesAreShifted(false)
	, m_thetaMin(0)
	, m_thetaMax(0)
	, m_deltaTheta(0)
	, m_yawAnglesAreShifted(false)
	, m_rotationOrder(rotOrder)
	, m_sensorRange(0)
	, m_uncertainty(static_cast<PointCoordinateType>(ZERO_TOLERANCE))
{
	//graphic representation
	lockVisibility(false);
	setSelectionBehavior(SELECTION_FIT_BBOX);
}
Ejemplo n.º 10
0
ccImage::ccImage(const QImage& image, const QString& name)
	: ccHObject(name)
	, m_width(image.width())
	, m_height(image.height())
	, m_texU(1.0f)
	, m_texV(1.0f)
	, m_texAlpha(1.0f)
	, m_textureID(0)
	, m_boundWin(0)
	, m_image(image)
	, m_associatedSensor(0)
#ifdef INCLUDE_IMAGE_FILENAME
	, m_completeFileName("")
#endif
{
	setVisible(true);
	lockVisibility(false);
	setEnabled(true);
}
Ejemplo n.º 11
0
ccImage::ccImage()
	: ccHObject("Not loaded")
	, m_width(0)
	, m_height(0)
	, m_aspectRatio(1.0f)
	, m_texU(1.0f)
	, m_texV(1.0f)
	, m_texAlpha(1.0f)
	, m_textureID(0)
	, m_boundWin(0)
	, m_associatedSensor(0)
#ifdef INCLUDE_IMAGE_FILENAME
	, m_completeFileName("")
#endif
{
	setVisible(true);
	lockVisibility(false);
	setEnabled(false);
}
Ejemplo n.º 12
0
void ccPolyline::importParametersFrom(const ccPolyline& poly)
{
	setClosed(poly.m_isClosed);
	set2DMode(poly.m_mode2D);
	setForeground(poly.m_foreground);
	setVisible(poly.isVisible());
	lockVisibility(poly.isVisiblityLocked());
	setColor(poly.m_rgbColor);
	setWidth(poly.m_width);
	showColors(poly.colorsShown());
	showVertices(poly.verticesShown());
	setVertexMarkerWidth(poly.getVertexMarkerWidth());
	setVisible(poly.isVisible());
	showArrow(m_showArrow,m_arrowIndex,m_arrowLength);
	setGlobalScale(poly.getGlobalScale());
	setGlobalShift(poly.getGlobalShift());
	setGLTransformationHistory(poly.getGLTransformationHistory());
	setMetaData(poly.metaData());
}
Ejemplo n.º 13
0
ccFacet::ccFacet(	PointCoordinateType maxEdgeLength/*=0*/,
					const QString& name/*=QString("Facet")*/ )
	: ccHObject(name)
	, m_polygonMesh(nullptr)
	, m_contourPolyline(nullptr)
	, m_contourVertices(nullptr)
	, m_originPoints(nullptr)
	, m_center(0,0,0)
	, m_rms(0.0)
	, m_surface(0.0)
	, m_maxEdgeLength(maxEdgeLength)
{
	m_planeEquation[0] = 0;
	m_planeEquation[1] = 0;
	m_planeEquation[2] = 1;
	m_planeEquation[3] = 0;

	setVisible(true);
	lockVisibility(false);
}
Ejemplo n.º 14
0
ccPolyline::ccPolyline(GenericIndexedCloudPersist* associatedCloud)
	: Polyline(associatedCloud)
	, ccShiftedObject("Polyline")
{
	set2DMode(false);
	setForeground(true);
	setVisible(true);
	lockVisibility(false);
	setColor(ccColor::white);
	showVertices(false);
	setVertexMarkerWidth(3);
	setWidth(0);
	showArrow(false,0,0);

	ccGenericPointCloud* cloud = dynamic_cast<ccGenericPointCloud*>(associatedCloud);
	if (cloud)
	{
		setGlobalScale(cloud->getGlobalScale());
		setGlobalShift(cloud->getGlobalShift());
	}
}